Package com.inductiveautomation.rm.text
Class RMFontFile
- java.lang.Object
- 
- com.inductiveautomation.rm.text.RMFontFile
 
- 
 public class RMFontFile extends java.lang.ObjectThis class represents all the information about a font that is independent of size. This allows RMFont to be lighter weight (essentially just a font file at a given size).- Since:
- 7.8.5 The ReportMill implementation of this would often come up with horribly bad matches for fonts, such as changing Tahoma Italic to Goudy Old Style (wtf?). Since we're holding on to the java Font anyway, rewrote to use that as the key, not the name.
 
- 
- 
Method SummaryAll Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description booleancanDisplay(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!).RMPathcharPath(char aChar)Returns the path for a given character.RMFontFilegetBold()Returns the bold version of this font.java.lang.StringgetFamily()Returns the family name of this font.java.lang.StringgetFamilyEnglish()Returns the family name of this font in English.static RMFontFilegetFontFile(java.awt.Font aFont)Returns a font file for a given font.static RMFontFilegetFontFile(java.lang.String aName)Deprecated.java.lang.StringgetFontName()Returns the name of this font.java.lang.StringgetFontNameEnglish()Returns the name of this font in English.intgetFontStyle()doublegetHeight()Returns the height of this font file.RMFontFilegetItalic()Returns the italic version of this font.doublegetLeading()Returns the default distance between lines for this font.doublegetLineAdvance()Returns the distance from the top of a line of text to the to top of a successive line of text.doublegetLineHeight()Returns the height of a line of text in this font.java.lang.StringgetLogicalName()Gets the logical name of this font.doublegetMaxAdvance()Returns the max advance of characters in this font.doublegetMaxAscent()Returns the max distance above the baseline that this font goes.doublegetMaxDescent()Returns the max distance below the baseline that this font goes.java.lang.StringgetPSName()Returns the PostScript name of this font.doublegetStrikethroughOffset()Returns the distance above the baseline that a strikethrough should be drawn.doublegetUnderlineOffset()Returns the distance below the baseline that an underline should be drawn.doublegetUnderlineThickness()Returns 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.RMFontFilesetStyle(int style)Returns this if the style is already set, else creates a new font with the style setRMFontFiletoggleStyle(int style)Creates a new font with the given style (Font.BOLD or Font.ITALIC) toggled.java.lang.StringtoString()Returns the font name of this font file.RMFontFileunsetStyle(int style)Returns this if the style is not already set, else creates a new font with the style unset
 
- 
- 
- 
Method Detail- 
getFontFile@Deprecated public static RMFontFile getFontFile(@Nonnull java.lang.String aName) Deprecated.Returns a font file for a given font name.
 - 
getFontFilepublic static RMFontFile getFontFile(@Nonnull java.awt.Font aFont) Returns a font file for a given font.
 - 
getFontNamepublic java.lang.String getFontName() Returns the name of this font.
 - 
getFontNameEnglishpublic java.lang.String getFontNameEnglish() Returns the name of this font in English.
 - 
getLogicalNamepublic java.lang.String getLogicalName() Gets the logical name of this font. This is the name used to create a new font.
 - 
getFamilypublic java.lang.String getFamily() Returns the family name of this font.
 - 
getFamilyEnglishpublic java.lang.String getFamilyEnglish() Returns the family name of this font in English.
 - 
getPSNamepublic java.lang.String getPSName() Returns the PostScript name of this font.
 - 
getFontStylepublic int getFontStyle() 
 - 
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!).
 - 
charPath@Nullable public RMPath charPath(char aChar) Returns the path for a given character.
 - 
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.
 - 
getBold@Nonnull public RMFontFile getBold() Returns the bold version of this font.
 - 
getItalic@Nonnull public RMFontFile getItalic() Returns the italic version of this font.
 - 
setStyle@Nonnull public RMFontFile setStyle(int style) Returns this if the style is already set, else creates a new font with the style set
 - 
unsetStyle@Nonnull public RMFontFile unsetStyle(int style) Returns this if the style is not already set, else creates a new font with the style unset
 - 
toggleStyle@Nonnull public RMFontFile toggleStyle(int style) Creates a new font with the given style (Font.BOLD or Font.ITALIC) toggled.
 - 
toStringpublic java.lang.String toString() Returns the font name of this font file.- Overrides:
- toStringin class- java.lang.Object
 
 
- 
 
-