|
||||||||||
| 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 float |
factor
|
protected static int |
HEIGHT
|
boolean |
isBold
|
boolean |
isIt
|
boolean |
isRoman
|
boolean |
isSs
|
boolean |
isTt
|
protected static int |
IT
|
static java.util.List<java.lang.Character.UnicodeBlock> |
loadedAlphabets
|
protected static int |
MID
|
protected static int |
NONE
No extension part for that kind (TOP,MID,REP or BOT) |
protected static int |
NUMBERS
|
static java.util.Map<java.lang.Character.UnicodeBlock,AlphabetRegistration> |
registeredAlphabets
|
protected static int |
REP
|
protected static int |
SMALL
|
protected static int |
TOP
|
protected static int |
UNICODE
|
protected static int |
WIDTH
|
| Fields inherited from interface org.scilab.forge.jlatexmath.TeXFont |
|---|
NO_FONT |
| Constructor Summary | |
|---|---|
DefaultTeXFont(float pointSize)
|
|
DefaultTeXFont(float pointSize,
boolean b,
boolean rm,
boolean ss,
boolean tt,
boolean it)
|
|
DefaultTeXFont(float pointSize,
float f,
boolean b,
boolean rm,
boolean ss,
boolean tt,
boolean it)
|
|
| Method Summary | |
|---|---|
static void |
addAlphabet(AlphabetRegistration reg)
|
static void |
addAlphabet(java.lang.Character.UnicodeBlock alphabet,
java.io.InputStream inlanguage,
java.lang.String language,
java.io.InputStream insymbols,
java.lang.String symbols,
java.io.InputStream inmappings,
java.lang.String mappings)
|
static void |
addAlphabet(java.lang.Character.UnicodeBlock alphabet,
java.lang.String name)
|
static void |
addAlphabet(java.lang.Object base,
java.lang.Character.UnicodeBlock[] alphabet,
java.lang.String language)
|
static void |
addTeXFontDescription(java.io.InputStream in,
java.lang.String name)
|
static void |
addTeXFontDescription(java.lang.Object base,
java.io.InputStream in,
java.lang.String name)
|
static void |
addTeXFontDescription(java.lang.String file)
|
TeXFont |
copy()
|
TeXFont |
deriveFont(float size)
Derives a new TeXFont object with the given point size |
static void |
enableMagnification(boolean b)
|
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. |
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()
|
static float |
getSizeFactor(int style)
|
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)
|
static void |
registerAlphabet(AlphabetRegistration reg)
|
TeXFont |
scaleFont(float factor)
|
void |
setBold(boolean bold)
|
void |
setIt(boolean it)
|
static void |
setMagnification(float mag)
|
static void |
setMathSizes(float ds,
float ts,
float ss,
float sss)
|
void |
setRoman(boolean rm)
|
void |
setSs(boolean ss)
|
void |
setTt(boolean tt)
|
| 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 UNICODE
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 static java.util.List<java.lang.Character.UnicodeBlock> loadedAlphabets
public static java.util.Map<java.lang.Character.UnicodeBlock,AlphabetRegistration> registeredAlphabets
protected float factor
public boolean isBold
public boolean isRoman
public boolean isSs
public boolean isTt
public boolean isIt
| Constructor Detail |
|---|
public DefaultTeXFont(float pointSize)
public DefaultTeXFont(float pointSize,
boolean b,
boolean rm,
boolean ss,
boolean tt,
boolean it)
public DefaultTeXFont(float pointSize,
float f,
boolean b,
boolean rm,
boolean ss,
boolean tt,
boolean it)
| Method Detail |
|---|
public static void addTeXFontDescription(java.lang.String file)
throws ResourceParseException
ResourceParseException
public static void addTeXFontDescription(java.io.InputStream in,
java.lang.String name)
throws ResourceParseException
ResourceParseException
public static void addTeXFontDescription(java.lang.Object base,
java.io.InputStream in,
java.lang.String name)
throws ResourceParseException
ResourceParseException
public static void addAlphabet(java.lang.Character.UnicodeBlock alphabet,
java.io.InputStream inlanguage,
java.lang.String language,
java.io.InputStream insymbols,
java.lang.String symbols,
java.io.InputStream inmappings,
java.lang.String mappings)
throws ResourceParseException
ResourceParseException
public static void addAlphabet(java.lang.Object base,
java.lang.Character.UnicodeBlock[] alphabet,
java.lang.String language)
throws ResourceParseException
ResourceParseException
public static void addAlphabet(java.lang.Character.UnicodeBlock alphabet,
java.lang.String name)
public static void addAlphabet(AlphabetRegistration reg)
public static void registerAlphabet(AlphabetRegistration reg)
public TeXFont copy()
copy in interface TeXFontpublic TeXFont deriveFont(float size)
TeXFontTeXFont object with the given point size
deriveFont in interface TeXFontsize - the new size (in points) of the derived TeXFont
TeXFont with the new sizepublic TeXFont scaleFont(float factor)
scaleFont in interface TeXFontpublic float getScaleFactor()
getScaleFactor in interface TeXFontpublic float getAxisHeight(int style)
getAxisHeight in interface TeXFontpublic float getBigOpSpacing1(int style)
getBigOpSpacing1 in interface TeXFontpublic float getBigOpSpacing2(int style)
getBigOpSpacing2 in interface TeXFontpublic float getBigOpSpacing3(int style)
getBigOpSpacing3 in interface TeXFontpublic float getBigOpSpacing4(int style)
getBigOpSpacing4 in interface TeXFontpublic 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 TeXFontc - 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 name
public Char getChar(CharFont cf,
int style)
TeXFont
getChar in interface TeXFontcf - 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 TeXFontsymbolName - the symbol namestyle - the style in which the atom should be drawn
SymbolMappingNotFoundException - if there's no symbol defined with the given
name
public Char getDefaultChar(char c,
int style)
TeXFont
getDefaultChar in interface TeXFontc - alphanumeric characterstyle - the style in which the atom should be drawn
public float getDefaultRuleThickness(int style)
getDefaultRuleThickness in interface TeXFontpublic float getDenom1(int style)
getDenom1 in interface TeXFontpublic float getDenom2(int style)
getDenom2 in interface TeXFont
public Extension getExtension(Char c,
int style)
TeXFont
getExtension in interface TeXFontc - 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 TeXFontleft - left characterright - right characterstyle - the style in which the atom should be drawn
public CharFont getLigature(CharFont left,
CharFont right)
TeXFont
getLigature in interface TeXFontleft - left characterright - right character
public int getMuFontId()
getMuFontId in interface TeXFont
public Char getNextLarger(Char c,
int style)
TeXFont
getNextLarger in interface TeXFontc - characterstyle - the style in which the atom should be drawn
public float getNum1(int style)
getNum1 in interface TeXFontpublic float getNum2(int style)
getNum2 in interface TeXFontpublic float getNum3(int style)
getNum3 in interface TeXFont
public float getQuad(int style,
int fontCode)
getQuad in interface TeXFontpublic float getSize()
getSize in interface TeXFont
public float getSkew(CharFont cf,
int style)
TeXFont
getSkew in interface TeXFontcf - 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 TeXFontpublic float getSub1(int style)
getSub1 in interface TeXFontpublic float getSub2(int style)
getSub2 in interface TeXFontpublic float getSubDrop(int style)
getSubDrop in interface TeXFontpublic float getSup1(int style)
getSup1 in interface TeXFontpublic float getSup2(int style)
getSup2 in interface TeXFontpublic float getSup3(int style)
getSup3 in interface TeXFontpublic float getSupDrop(int style)
getSupDrop in interface TeXFont
public float getXHeight(int style,
int fontCode)
getXHeight in interface TeXFontpublic boolean hasNextLarger(Char c)
hasNextLarger in interface TeXFontc - a character
public void setBold(boolean bold)
setBold in interface TeXFontpublic boolean getBold()
getBold in interface TeXFontpublic void setRoman(boolean rm)
setRoman in interface TeXFontpublic boolean getRoman()
getRoman in interface TeXFontpublic void setTt(boolean tt)
setTt in interface TeXFontpublic boolean getTt()
getTt in interface TeXFontpublic void setIt(boolean it)
setIt in interface TeXFontpublic boolean getIt()
getIt in interface TeXFontpublic void setSs(boolean ss)
setSs in interface TeXFontpublic boolean getSs()
getSs in interface TeXFontpublic boolean hasSpace(int font)
hasSpace in interface TeXFontpublic boolean isExtensionChar(Char c)
isExtensionChar in interface TeXFontc - a character
public static void setMathSizes(float ds,
float ts,
float ss,
float sss)
public static void setMagnification(float mag)
public static void enableMagnification(boolean b)
public static float getSizeFactor(int style)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||