Package org.scilab.forge.jlatexmath
Interface TeXFont
-
- All Known Implementing Classes:
DefaultTeXFont
public interface TeXFont
An interface representing a "TeXFont", which is responsible for all the necessary fonts and font information.- Author:
- Kurt Vermeulen
-
-
Field Summary
Fields Modifier and Type Field Description static int
NO_FONT
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description TeXFont
copy()
TeXFont
deriveFont(float pointSize)
Derives a newTeXFont
object with the given point sizefloat
getAxisHeight(int style)
float
getBigOpSpacing1(int style)
float
getBigOpSpacing2(int style)
float
getBigOpSpacing3(int style)
float
getBigOpSpacing4(int style)
float
getBigOpSpacing5(int style)
boolean
getBold()
Char
getChar(char c, java.lang.String textStyle, int style)
Get a Char-object specifying the given character in the given text style with metric information depending on the given "style".Char
getChar(java.lang.String name, int style)
Get a Char-object for the given symbol with metric information depending on "style".Char
getChar(CharFont cf, int style)
Get a Char-object for this specific character containing the metric informationChar
getDefaultChar(char c, int style)
Get a Char-object specifying the given character in the default text style with metric information depending on the given "style".float
getDefaultRuleThickness(int style)
float
getDenom1(int style)
float
getDenom2(int style)
float
getEM(int style)
Extension
getExtension(Char c, int style)
Get an Extension-object for the given Char containing the 4 possible parts to build an arbitrary large variant.boolean
getIt()
float
getKern(CharFont left, CharFont right, int style)
Get the kern value to be inserted between the given characters in the given style.CharFont
getLigature(CharFont left, CharFont right)
Get the ligature that replaces both characters (if any).int
getMuFontId()
Char
getNextLarger(Char c, int style)
Get the next larger version of the given character.float
getNum1(int style)
float
getNum2(int style)
float
getNum3(int style)
float
getQuad(int style, int fontCode)
boolean
getRoman()
float
getScaleFactor()
float
getSize()
float
getSkew(CharFont cf, int style)
Get the kern amount of the character defined by the given CharFont followed by the "skewchar" of it's font.float
getSpace(int style)
boolean
getSs()
float
getSub1(int style)
float
getSub2(int style)
float
getSubDrop(int style)
float
getSup1(int style)
float
getSup2(int style)
float
getSup3(int style)
float
getSupDrop(int style)
boolean
getTt()
float
getXHeight(int style, int fontCode)
boolean
hasNextLarger(Char c)
boolean
hasSpace(int font)
boolean
isExtensionChar(Char c)
TeXFont
scaleFont(float factor)
void
setBold(boolean bold)
void
setIt(boolean it)
void
setRoman(boolean rm)
void
setSs(boolean ss)
void
setTt(boolean tt)
-
-
-
Field Detail
-
NO_FONT
static final int NO_FONT
- See Also:
- Constant Field Values
-
-
Method Detail
-
deriveFont
TeXFont deriveFont(float pointSize)
Derives a newTeXFont
object with the given point size
-
scaleFont
TeXFont scaleFont(float factor)
-
getScaleFactor
float getScaleFactor()
-
getAxisHeight
float getAxisHeight(int style)
-
getBigOpSpacing1
float getBigOpSpacing1(int style)
-
getBigOpSpacing2
float getBigOpSpacing2(int style)
-
getBigOpSpacing3
float getBigOpSpacing3(int style)
-
getBigOpSpacing4
float getBigOpSpacing4(int style)
-
getBigOpSpacing5
float getBigOpSpacing5(int style)
-
getChar
Char getChar(char c, java.lang.String textStyle, int style) throws TextStyleMappingNotFoundException
Get a Char-object specifying the given character in the given text style with metric information depending on the given "style".- Parameters:
c
- alphanumeric charactertextStyle
- the text style in which the character should be drawnstyle
- the style in which the atom should be drawn- Returns:
- the Char-object specifying the given character in the given text style
- Throws:
TextStyleMappingNotFoundException
- if there's no text style defined with the given name
-
getChar
Char getChar(CharFont cf, int style)
Get a Char-object for this specific character containing the metric information- Parameters:
cf
- CharFont-object determining a specific character of a specific fontstyle
- the style in which the atom should be drawn- Returns:
- the Char-object for this character containing metric information
-
getChar
Char getChar(java.lang.String name, int style) throws SymbolMappingNotFoundException
Get a Char-object for the given symbol with metric information depending on "style".- Parameters:
name
- the symbol namestyle
- the style in which the atom should be drawn- Returns:
- a Char-object for this symbol with metric information
- Throws:
SymbolMappingNotFoundException
- if there's no symbol defined with the given name
-
getDefaultChar
Char getDefaultChar(char c, int style)
Get a Char-object specifying the given character in the default text style with metric information depending on the given "style".- Parameters:
c
- alphanumeric characterstyle
- the style in which the atom should be drawn- Returns:
- the Char-object specifying the given character in the default text style
-
getDefaultRuleThickness
float getDefaultRuleThickness(int style)
-
getDenom1
float getDenom1(int style)
-
getDenom2
float getDenom2(int style)
-
getExtension
Extension getExtension(Char c, int style)
Get an Extension-object for the given Char containing the 4 possible parts to build an arbitrary large variant. This will only be called if isExtensionChar(Char) returns true.- Parameters:
c
- a Char-object for a specific characterstyle
- the style in which the atom should be drawn- Returns:
- an Extension object containing the 4 possible parts
-
getKern
float getKern(CharFont left, CharFont right, int style)
Get the kern value to be inserted between the given characters in the given style.- Parameters:
left
- left characterright
- right characterstyle
- the style in which the atom should be drawn- Returns:
- the kern value between both characters (default 0)
-
getLigature
CharFont getLigature(CharFont left, CharFont right)
Get the ligature that replaces both characters (if any).- Parameters:
left
- left characterright
- right character- Returns:
- a ligature replacing both characters (or null: no ligature)
-
getMuFontId
int getMuFontId()
-
getNextLarger
Char getNextLarger(Char c, int style)
Get the next larger version of the given character. This is only called if hasNextLarger(Char) returns true.- Parameters:
c
- characterstyle
- the style in which the atom should be drawn- Returns:
- the next larger version of this character
-
getNum1
float getNum1(int style)
-
getNum2
float getNum2(int style)
-
getNum3
float getNum3(int style)
-
getQuad
float getQuad(int style, int fontCode)
-
getSize
float getSize()
- Returns:
- the point size of this TeXFont
-
getSkew
float getSkew(CharFont cf, int style)
Get the kern amount of the character defined by the given CharFont followed by the "skewchar" of it's font. This is used in the algorithm for placing an accent above a single character.- Parameters:
cf
- the character and it's font above which an accent has to be placedstyle
- the render style- Returns:
- the kern amount of the character defined by cf followed by the "skewchar" of it's font.
-
getSpace
float getSpace(int style)
-
getSub1
float getSub1(int style)
-
getSub2
float getSub2(int style)
-
getSubDrop
float getSubDrop(int style)
-
getSup1
float getSup1(int style)
-
getSup2
float getSup2(int style)
-
getSup3
float getSup3(int style)
-
getSupDrop
float getSupDrop(int style)
-
getXHeight
float getXHeight(int style, int fontCode)
-
getEM
float getEM(int style)
-
hasNextLarger
boolean hasNextLarger(Char c)
- Parameters:
c
- a character- Returns:
- true if the given character has a larger version, false otherwise
-
hasSpace
boolean hasSpace(int font)
-
setBold
void setBold(boolean bold)
-
getBold
boolean getBold()
-
setRoman
void setRoman(boolean rm)
-
getRoman
boolean getRoman()
-
setTt
void setTt(boolean tt)
-
getTt
boolean getTt()
-
setIt
void setIt(boolean it)
-
getIt
boolean getIt()
-
setSs
void setSs(boolean ss)
-
getSs
boolean getSs()
-
isExtensionChar
boolean isExtensionChar(Char c)
- Parameters:
c
- a character- Returns:
- true if the given character contains extension information to buid an arbitrary large version of this character.
-
copy
TeXFont copy()
-
-