Package com.reportmill.text
Class RMFontFile
- java.lang.Object
- 
- com.reportmill.base.RMObject
- 
- com.reportmill.text.RMFontFile
 
 
- 
- All Implemented Interfaces:
- RMArchiver.Archiving,- java.lang.Cloneable
 
 public class RMFontFile extends RMObject This 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).
- 
- 
Method SummaryAll Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.awt.Fontawt()Returns the AWT font represented by the font file.booleancanDisplay(char aChar)Returns if this font can display the given char.floatcharAdvance(char aChar)Returns the char advance for the given char.floatcharKern(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.lang.String aName)Returns a font file for a given font name.java.lang.StringgetFontName()Returns the name of this font.java.lang.StringgetFontNameEnglish()Returns the name of this font in English.floatgetHeight()Returns the height of this font file.RMFontFilegetItalic()Returns the italic version of this font.floatgetLeading()Returns the default distance between lines for this font.floatgetLineHeight()Returns the height of a line of text in this font.floatgetMaxAdvance()Returns the max advance of characters in this font.floatgetMaxAscent()Returns the max distance above the baseline that this font goes.floatgetMaxDescent()Returns the max distance below the baseline that this font goes.java.lang.StringgetPSName()Returns the PostScript name of this font.floatgetStrikethroughOffset()Returns the distance above the baseline that a strikethrough should be drawn.floatgetUnderlineOffset()Returns the distance below the baseline that an underline should be drawn.floatgetUnderlineThickness()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.intstyle()Returns the awt style of this font.java.lang.StringtoString()Returns the font name of this font file.- 
Methods inherited from class com.reportmill.base.RMObjectclone, copy, didChange, didUndo, getAnimAttribute, getClassNameShort, initWithArchiver, undoClone, undoCopy, undoEquals
 
- 
 
- 
- 
- 
Method Detail- 
getFontFilepublic static RMFontFile getFontFile(java.lang.String aName) Returns a font file for a given font name.
 - 
awtpublic java.awt.Font awt() Returns the AWT font represented by the font file.
 - 
getFontNamepublic java.lang.String getFontName() Returns the name of this font.
 - 
getFontNameEnglishpublic java.lang.String getFontNameEnglish() Returns the name of this font in English.
 - 
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.
 - 
charAdvancepublic float charAdvance(char aChar) Returns the char advance for the given char.
 - 
charKernpublic float charKern(char aChar1, char aChar2)Returns the kerning for the given pair of characters (no way to do this in Java!).
 - 
charPathpublic RMPath charPath(char aChar) Returns the path for a given character.
 - 
getMaxAscentpublic float getMaxAscent() Returns the max distance above the baseline that this font goes.
 - 
getMaxDescentpublic float getMaxDescent() Returns the max distance below the baseline that this font goes.
 - 
getLeadingpublic float getLeading() Returns the default distance between lines for this font.
 - 
getHeightpublic float getHeight() Returns the height of this font file.
 - 
getLineHeightpublic float getLineHeight() Returns the height of a line of text in this font.
 - 
getMaxAdvancepublic float getMaxAdvance() Returns the max advance of characters in this font.
 - 
getUnderlineOffsetpublic float getUnderlineOffset() Returns the distance below the baseline that an underline should be drawn.
 - 
getUnderlineThicknesspublic float getUnderlineThickness() Returns the default thickness that an underline should be drawn.
 - 
getStrikethroughOffsetpublic float 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.
 - 
stylepublic int style() Returns the awt style of this font.
 - 
canDisplaypublic boolean canDisplay(char aChar) Returns if this font can display the given char.
 - 
getBoldpublic RMFontFile getBold() Returns the bold version of this font.
 - 
getItalicpublic RMFontFile getItalic() Returns the italic version of this font.
 - 
toStringpublic java.lang.String toString() Returns the font name of this font file.- Overrides:
- toStringin class- java.lang.Object
 
 
- 
 
-