Package com.inductiveautomation.snap.gfx
Class SnapFontFile
java.lang.Object
com.inductiveautomation.snap.gfx.SnapFontFile
This class represents all the information about a font that is independent of size. This allows SnapFont to be
 lighter weight (essentially just a font file at a given size).
- 
Method SummaryModifier and TypeMethodDescriptionbooleancanDisplay(char aChar) Returns if this font can display the given char.doublecharAdvance(char aChar) Returns the char advance for the given char.doublecharKern(char aChar1, char aChar2) Returns the kerning for the given pair of characters (no way to do this in Java!).getBold()Returns the bold version of this font.Returns the family name of this font.Returns the family name of this font in English.static SnapFontFilegetFontFile(String aName) Returns a font file for a given font name.Returns the name of this font.Returns the name of this font in English.doubleReturns the height of this font file.Returns the italic version of this font.doubleReturns the default distance between lines for this font.doubleReturns the distance from the top of a line of text to the to top of a successive line of text.doubleReturns the height of a line of text in this font.doubleReturns the max advance of characters in this font.doubleReturns the max distance above the baseline that this font goes.doubleReturns the max distance below the baseline that this font goes.Returns the PostScript name of this font.doubleReturns the distance above the baseline that a strikethrough should be drawn.doubleReturns the distance below the baseline that an underline should be drawn.doubleReturns the default thickness that an underline should be drawn.booleanisBold()Returns whether this font is considered bold.booleanisItalic()Returns whether this font is considered italic.toString()Returns the font name of this font file.
- 
Method Details- 
getFontFileReturns a font file for a given font name.
- 
getFontNameReturns the name of this font.
- 
getFontNameEnglishReturns the name of this font in English.
- 
getFamilyReturns the family name of this font.
- 
getFamilyEnglishReturns the family name of this font in English.
- 
getPSNameReturns the PostScript name of this font.
- 
charAdvancepublic double charAdvance(char aChar) Returns the char advance for the given char.
- 
charKernpublic double charKern(char aChar1, char aChar2) Returns the kerning for the given pair of characters (no way to do this in Java!).
- 
getMaxAscentpublic double getMaxAscent()Returns the max distance above the baseline that this font goes.
- 
getMaxDescentpublic double getMaxDescent()Returns the max distance below the baseline that this font goes.
- 
getLeadingpublic double getLeading()Returns the default distance between lines for this font.
- 
getHeightpublic double getHeight()Returns the height of this font file.
- 
getLineHeightpublic double getLineHeight()Returns the height of a line of text in this font.
- 
getLineAdvancepublic double getLineAdvance()Returns the distance from the top of a line of text to the to top of a successive line of text.
- 
getMaxAdvancepublic double getMaxAdvance()Returns the max advance of characters in this font.
- 
getUnderlineOffsetpublic double getUnderlineOffset()Returns the distance below the baseline that an underline should be drawn.
- 
getUnderlineThicknesspublic double getUnderlineThickness()Returns the default thickness that an underline should be drawn.
- 
getStrikethroughOffsetpublic double getStrikethroughOffset()Returns the distance above the baseline that a strikethrough should be drawn.
- 
isBoldpublic boolean isBold()Returns whether this font is considered bold.
- 
isItalicpublic boolean isItalic()Returns whether this font is considered italic.
- 
canDisplaypublic boolean canDisplay(char aChar) Returns if this font can display the given char.
- 
getBoldReturns the bold version of this font.
- 
getItalicReturns the italic version of this font.
- 
toStringReturns the font name of this font file.
 
-