Class DefaultTeXFont
java.lang.Object
org.scilab.forge.jlatexmath.DefaultTeXFont
- All Implemented Interfaces:
TeXFont
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected static final intprotected static final intprotected static final intprotected floatprotected static final intbooleanbooleanbooleanbooleanbooleanprotected static final intstatic List<Character.UnicodeBlock> protected static final intprotected static final intNo extension part for that kind (TOP,MID,REP or BOT)protected static final intprotected static final intprotected static final intprotected static final intprotected static final intprotected static final int -
Constructor Summary
ConstructorsConstructorDescriptionDefaultTeXFont(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
Modifier and TypeMethodDescriptionstatic voidaddAlphabet(Character.UnicodeBlock alphabet, InputStream inlanguage, String language, InputStream insymbols, String symbols, InputStream inmappings, String mappings) static voidaddAlphabet(Character.UnicodeBlock alphabet, String name) static voidaddAlphabet(Object base, Character.UnicodeBlock[] alphabet, String language) static voidstatic voidaddTeXFontDescription(InputStream in, String name) static voidaddTeXFontDescription(Object base, InputStream in, String name) static voidaddTeXFontDescription(String file) copy()deriveFont(float size) Derives a newTeXFontobject with the given point sizestatic voidenableMagnification(boolean b) floatgetAxisHeight(int style) floatgetBigOpSpacing1(int style) floatgetBigOpSpacing2(int style) floatgetBigOpSpacing3(int style) floatgetBigOpSpacing4(int style) floatgetBigOpSpacing5(int style) booleangetBold()Get a Char-object specifying the given character in the given text style with metric information depending on the given "style".Get a Char-object for the given symbol with metric information depending on "style".Get a Char-object for this specific character containing the metric informationgetDefaultChar(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".floatgetDefaultRuleThickness(int style) floatgetDenom1(int style) floatgetDenom2(int style) floatgetEM(int style) getExtension(Char c, int style) Get an Extension-object for the given Char containing the 4 possible parts to build an arbitrary large variant.booleangetIt()floatGet the kern value to be inserted between the given characters in the given style.getLigature(CharFont left, CharFont right) Get the ligature that replaces both characters (if any).intgetNextLarger(Char c, int style) Get the next larger version of the given character.floatgetNum1(int style) floatgetNum2(int style) floatgetNum3(int style) floatgetQuad(int style, int fontCode) booleangetRoman()floatfloatgetSize()static floatgetSizeFactor(int style) floatGet the kern amount of the character defined by the given CharFont followed by the "skewchar" of it's font.floatgetSpace(int style) booleangetSs()floatgetSub1(int style) floatgetSub2(int style) floatgetSubDrop(int style) floatgetSup1(int style) floatgetSup2(int style) floatgetSup3(int style) floatgetSupDrop(int style) booleangetTt()floatgetXHeight(int style, int fontCode) booleanbooleanhasSpace(int font) booleanstatic voidscaleFont(float factor) voidsetBold(boolean bold) voidsetIt(boolean it) static voidsetMagnification(float mag) static voidsetMathSizes(float ds, float ts, float ss, float sss) voidsetRoman(boolean rm) voidsetSs(boolean ss) voidsetTt(boolean tt)
-
Field Details
-
NONE
protected static final int NONENo extension part for that kind (TOP,MID,REP or BOT)- See Also:
-
NUMBERS
protected static final int NUMBERS- See Also:
-
CAPITALS
protected static final int CAPITALS- See Also:
-
SMALL
protected static final int SMALL- See Also:
-
UNICODE
protected static final int UNICODE- See Also:
-
TOP
protected static final int TOP- See Also:
-
MID
protected static final int MID- See Also:
-
REP
protected static final int REP- See Also:
-
BOT
protected static final int BOT- See Also:
-
WIDTH
protected static final int WIDTH- See Also:
-
HEIGHT
protected static final int HEIGHT- See Also:
-
DEPTH
protected static final int DEPTH- See Also:
-
IT
protected static final int IT- See Also:
-
loadedAlphabets
-
registeredAlphabets
-
factor
protected float factor -
isBold
public boolean isBold -
isRoman
public boolean isRoman -
isSs
public boolean isSs -
isTt
public boolean isTt -
isIt
public boolean isIt
-
-
Constructor Details
-
DefaultTeXFont
public DefaultTeXFont(float pointSize) -
DefaultTeXFont
public DefaultTeXFont(float pointSize, boolean b, boolean rm, boolean ss, boolean tt, boolean it) -
DefaultTeXFont
public DefaultTeXFont(float pointSize, float f, boolean b, boolean rm, boolean ss, boolean tt, boolean it)
-
-
Method Details
-
addTeXFontDescription
- Throws:
ResourceParseException
-
addTeXFontDescription
- Throws:
ResourceParseException
-
addTeXFontDescription
public static void addTeXFontDescription(Object base, InputStream in, String name) throws ResourceParseException - Throws:
ResourceParseException
-
addAlphabet
public static void addAlphabet(Character.UnicodeBlock alphabet, InputStream inlanguage, String language, InputStream insymbols, String symbols, InputStream inmappings, String mappings) throws ResourceParseException - Throws:
ResourceParseException
-
addAlphabet
public static void addAlphabet(Object base, Character.UnicodeBlock[] alphabet, String language) throws ResourceParseException - Throws:
ResourceParseException
-
addAlphabet
-
addAlphabet
-
registerAlphabet
-
copy
-
deriveFont
-
scaleFont
-
getScaleFactor
public float getScaleFactor()- Specified by:
getScaleFactorin interfaceTeXFont
-
getAxisHeight
public float getAxisHeight(int style) - Specified by:
getAxisHeightin interfaceTeXFont
-
getBigOpSpacing1
public float getBigOpSpacing1(int style) - Specified by:
getBigOpSpacing1in interfaceTeXFont
-
getBigOpSpacing2
public float getBigOpSpacing2(int style) - Specified by:
getBigOpSpacing2in interfaceTeXFont
-
getBigOpSpacing3
public float getBigOpSpacing3(int style) - Specified by:
getBigOpSpacing3in interfaceTeXFont
-
getBigOpSpacing4
public float getBigOpSpacing4(int style) - Specified by:
getBigOpSpacing4in interfaceTeXFont
-
getBigOpSpacing5
public float getBigOpSpacing5(int style) - Specified by:
getBigOpSpacing5in interfaceTeXFont
-
getChar
Description copied from interface:TeXFontGet a Char-object specifying the given character in the given text style with metric information depending on the given "style".- Specified by:
getCharin interfaceTeXFont- 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
Description copied from interface:TeXFontGet a Char-object for this specific character containing the metric information -
getChar
Description copied from interface:TeXFontGet a Char-object for the given symbol with metric information depending on "style".- Specified by:
getCharin interfaceTeXFont- Parameters:
symbolName- 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
Description copied from interface:TeXFontGet a Char-object specifying the given character in the default text style with metric information depending on the given "style".- Specified by:
getDefaultCharin interfaceTeXFont- 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
public float getDefaultRuleThickness(int style) - Specified by:
getDefaultRuleThicknessin interfaceTeXFont
-
getDenom1
-
getDenom2
-
getExtension
Description copied from interface:TeXFontGet 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.- Specified by:
getExtensionin interfaceTeXFont- 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
Description copied from interface:TeXFontGet the kern value to be inserted between the given characters in the given style. -
getLigature
Description copied from interface:TeXFontGet the ligature that replaces both characters (if any).- Specified by:
getLigaturein interfaceTeXFont- Parameters:
left- left characterright- right character- Returns:
- a ligature replacing both characters (or null: no ligature)
-
getMuFontId
public int getMuFontId()- Specified by:
getMuFontIdin interfaceTeXFont
-
getNextLarger
Description copied from interface:TeXFontGet the next larger version of the given character. This is only called if hasNextLarger(Char) returns true.- Specified by:
getNextLargerin interfaceTeXFont- Parameters:
c- characterstyle- the style in which the atom should be drawn- Returns:
- the next larger version of this character
-
getNum1
-
getNum2
-
getNum3
-
getQuad
-
getSize
-
getSkew
Description copied from interface:TeXFontGet 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. -
getSpace
-
getSub1
-
getSub2
-
getSubDrop
public float getSubDrop(int style) - Specified by:
getSubDropin interfaceTeXFont
-
getSup1
-
getSup2
-
getSup3
-
getSupDrop
public float getSupDrop(int style) - Specified by:
getSupDropin interfaceTeXFont
-
getXHeight
public float getXHeight(int style, int fontCode) - Specified by:
getXHeightin interfaceTeXFont
-
getEM
-
hasNextLarger
- Specified by:
hasNextLargerin interfaceTeXFont- Parameters:
c- a character- Returns:
- true if the given character has a larger version, false otherwise
-
setBold
-
getBold
-
setRoman
-
getRoman
-
setTt
-
getTt
-
setIt
-
getIt
-
setSs
-
getSs
-
hasSpace
-
isExtensionChar
- Specified by:
isExtensionCharin interfaceTeXFont- Parameters:
c- a character- Returns:
- true if the given character contains extension information to buid an arbitrary large version of this character.
-
setMathSizes
public static void setMathSizes(float ds, float ts, float ss, float sss) -
setMagnification
public static void setMagnification(float mag) -
enableMagnification
public static void enableMagnification(boolean b) -
getSizeFactor
public static float getSizeFactor(int style)
-