|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.scilab.forge.jlatexmath.DefaultTeXFont
public class DefaultTeXFont
The default implementation of the TeXFont-interface. All font information is read from an xml-file.
Field Summary | |
---|---|
protected static int |
BOT
|
protected static int |
CAPITALS
|
protected static int |
DEPTH
|
protected static int |
HEIGHT
|
boolean |
isBold
|
protected static int |
IT
|
protected static int |
MID
|
protected static int |
NONE
No extension part for that kind (TOP,MID,REP or BOT) |
protected static int |
NUMBERS
|
protected static int |
REP
|
protected static int |
SMALL
|
protected static int |
TOP
|
protected static int |
WIDTH
|
Fields inherited from interface org.scilab.forge.jlatexmath.TeXFont |
---|
NO_FONT, PIXELS_PER_POINT |
Constructor Summary | |
---|---|
DefaultTeXFont(float pointSize)
|
Method Summary | |
---|---|
TeXFont |
deriveFont(float size)
Derives a new TeXFont object with the given point size |
float |
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(CharFont cf,
int style)
Get a Char-object for this specific character containing the metric information |
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 symbolName,
int style)
Get a Char-object for the given symbol with metric information depending on "style". |
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". |
float |
getDefaultRuleThickness(int style)
|
float |
getDenom1(int style)
|
float |
getDenom2(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. |
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)
|
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)
|
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)
|
float |
getXHeight(int style,
int fontCode)
|
boolean |
hasNextLarger(Char c)
|
boolean |
hasSpace(int font)
|
boolean |
isExtensionChar(Char c)
|
void |
setBold(boolean bold)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected static final int NONE
protected static final int NUMBERS
protected static final int CAPITALS
protected static final int SMALL
protected static final int TOP
protected static final int MID
protected static final int REP
protected static final int BOT
protected static final int WIDTH
protected static final int HEIGHT
protected static final int DEPTH
protected static final int IT
public boolean isBold
Constructor Detail |
---|
public DefaultTeXFont(float pointSize)
Method Detail |
---|
public TeXFont deriveFont(float size)
TeXFont
TeXFont
object with the given point size
deriveFont
in interface TeXFont
size
- the new size (in points) of the derived TeXFont
TeXFont
with the new sizepublic float getAxisHeight(int style)
getAxisHeight
in interface TeXFont
public float getBigOpSpacing1(int style)
getBigOpSpacing1
in interface TeXFont
public float getBigOpSpacing2(int style)
getBigOpSpacing2
in interface TeXFont
public float getBigOpSpacing3(int style)
getBigOpSpacing3
in interface TeXFont
public float getBigOpSpacing4(int style)
getBigOpSpacing4
in interface TeXFont
public float getBigOpSpacing5(int style)
getBigOpSpacing5
in interface TeXFont
public Char getChar(char c, java.lang.String textStyle, int style) throws TextStyleMappingNotFoundException
TeXFont
getChar
in interface TeXFont
c
- alphanumeric charactertextStyle
- the text style in which the character should be drawnstyle
- the style in which the atom should be drawn
TextStyleMappingNotFoundException
- if there's no text style defined with
the given namepublic Char getChar(CharFont cf, int style)
TeXFont
getChar
in interface TeXFont
cf
- CharFont-object determining a specific character of a specific fontstyle
- the style in which the atom should be drawn
public Char getChar(java.lang.String symbolName, int style) throws SymbolMappingNotFoundException
TeXFont
getChar
in interface TeXFont
symbolName
- the symbol namestyle
- the style in which the atom should be drawn
SymbolMappingNotFoundException
- if there's no symbol defined with the given
namepublic Char getDefaultChar(char c, int style)
TeXFont
getDefaultChar
in interface TeXFont
c
- alphanumeric characterstyle
- the style in which the atom should be drawn
public float getDefaultRuleThickness(int style)
getDefaultRuleThickness
in interface TeXFont
public float getDenom1(int style)
getDenom1
in interface TeXFont
public float getDenom2(int style)
getDenom2
in interface TeXFont
public Extension getExtension(Char c, int style)
TeXFont
getExtension
in interface TeXFont
c
- a Char-object for a specific characterstyle
- the style in which the atom should be drawn
public float getKern(CharFont left, CharFont right, int style)
TeXFont
getKern
in interface TeXFont
left
- left characterright
- right characterstyle
- the style in which the atom should be drawn
public CharFont getLigature(CharFont left, CharFont right)
TeXFont
getLigature
in interface TeXFont
left
- left characterright
- right character
public int getMuFontId()
getMuFontId
in interface TeXFont
public Char getNextLarger(Char c, int style)
TeXFont
getNextLarger
in interface TeXFont
c
- characterstyle
- the style in which the atom should be drawn
public float getNum1(int style)
getNum1
in interface TeXFont
public float getNum2(int style)
getNum2
in interface TeXFont
public float getNum3(int style)
getNum3
in interface TeXFont
public float getQuad(int style, int fontCode)
getQuad
in interface TeXFont
public float getSize()
getSize
in interface TeXFont
public float getSkew(CharFont cf, int style)
TeXFont
getSkew
in interface TeXFont
cf
- the character and it's font above which an accent has to be placedstyle
- the render style
public float getSpace(int style)
getSpace
in interface TeXFont
public float getSub1(int style)
getSub1
in interface TeXFont
public float getSub2(int style)
getSub2
in interface TeXFont
public float getSubDrop(int style)
getSubDrop
in interface TeXFont
public float getSup1(int style)
getSup1
in interface TeXFont
public float getSup2(int style)
getSup2
in interface TeXFont
public float getSup3(int style)
getSup3
in interface TeXFont
public float getSupDrop(int style)
getSupDrop
in interface TeXFont
public float getXHeight(int style, int fontCode)
getXHeight
in interface TeXFont
public boolean hasNextLarger(Char c)
hasNextLarger
in interface TeXFont
c
- a character
public void setBold(boolean bold)
setBold
in interface TeXFont
public boolean getBold()
getBold
in interface TeXFont
public boolean hasSpace(int font)
hasSpace
in interface TeXFont
public boolean isExtensionChar(Char c)
isExtensionChar
in interface TeXFont
c
- a character
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |