Package com.reportmill.text
Class RMFontFile
java.lang.Object
com.reportmill.base.RMObject
com.reportmill.text.RMFontFile
- All Implemented Interfaces:
RMArchiver.Archiving
,Cloneable
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 Summary
Modifier and TypeMethodDescriptionawt()
Returns the AWT font represented by the font file.boolean
canDisplay
(char aChar) Returns if this font can display the given char.float
charAdvance
(char aChar) Returns the char advance for the given char.float
charKern
(char aChar1, char aChar2) Returns the kerning for the given pair of characters (no way to do this in Java!).charPath
(char aChar) Returns the path for a given character.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 RMFontFile
getFontFile
(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.float
Returns the height of this font file.Returns the italic version of this font.float
Returns the default distance between lines for this font.float
Returns the height of a line of text in this font.float
Returns the max advance of characters in this font.float
Returns the max distance above the baseline that this font goes.float
Returns the max distance below the baseline that this font goes.Returns the PostScript name of this font.float
Returns the distance above the baseline that a strikethrough should be drawn.float
Returns the distance below the baseline that an underline should be drawn.float
Returns the default thickness that an underline should be drawn.boolean
isBold()
Returns whether this font is considered bold.boolean
isItalic()
Returns whether this font is considered italic.int
style()
Returns the awt style of this font.toString()
Returns the font name of this font file.Methods inherited from class com.reportmill.base.RMObject
clone, copy, didChange, didUndo, getAnimAttribute, getClassNameShort, initWithArchiver, undoClone, undoCopy, undoEquals
-
Method Details
-
getFontFile
Returns a font file for a given font name. -
awt
Returns the AWT font represented by the font file. -
getFontName
Returns the name of this font. -
getFontNameEnglish
Returns the name of this font in English. -
getFamily
Returns the family name of this font. -
getFamilyEnglish
Returns the family name of this font in English. -
getPSName
Returns the PostScript name of this font. -
charAdvance
public float charAdvance(char aChar) Returns the char advance for the given char. -
charKern
public float charKern(char aChar1, char aChar2) Returns the kerning for the given pair of characters (no way to do this in Java!). -
charPath
Returns the path for a given character. -
getMaxAscent
public float getMaxAscent()Returns the max distance above the baseline that this font goes. -
getMaxDescent
public float getMaxDescent()Returns the max distance below the baseline that this font goes. -
getLeading
public float getLeading()Returns the default distance between lines for this font. -
getHeight
public float getHeight()Returns the height of this font file. -
getLineHeight
public float getLineHeight()Returns the height of a line of text in this font. -
getMaxAdvance
public float getMaxAdvance()Returns the max advance of characters in this font. -
getUnderlineOffset
public float getUnderlineOffset()Returns the distance below the baseline that an underline should be drawn. -
getUnderlineThickness
public float getUnderlineThickness()Returns the default thickness that an underline should be drawn. -
getStrikethroughOffset
public float getStrikethroughOffset()Returns the distance above the baseline that a strikethrough should be drawn. -
isBold
public boolean isBold()Returns whether this font is considered bold. -
isItalic
public boolean isItalic()Returns whether this font is considered italic. -
style
public int style()Returns the awt style of this font. -
canDisplay
public boolean canDisplay(char aChar) Returns if this font can display the given char. -
getBold
Returns the bold version of this font. -
getItalic
Returns the italic version of this font. -
toString
Returns the font name of this font file.
-