Package org.apache.fop.afp.fonts
Class OutlineFont
java.lang.Object
org.apache.fop.fonts.Typeface
org.apache.fop.afp.fonts.AFPFont
org.apache.fop.afp.fonts.AbstractOutlineFont
org.apache.fop.afp.fonts.OutlineFont
- All Implemented Interfaces:
FontMetrics
- Direct Known Subclasses:
AFPFontConfig.AFPTrueTypeFont
Default implementation of AbstractOutlineFont.
-
Field Summary
Fields inherited from class org.apache.fop.afp.fonts.AbstractOutlineFont
charSetFields inherited from class org.apache.fop.fonts.Typeface
eventListener, NOT_FOUND -
Constructor Summary
ConstructorsConstructorDescriptionOutlineFont(String name, boolean embeddable, CharacterSet charSet, AFPEventProducer eventProducer) Construct outline font with specified name and character set. -
Method Summary
Modifier and TypeMethodDescriptiongetBoundingBox(int character, int size) Returns the bounding box of the glyph at the given index, for the given font size.intgetWidth(int character, int size) Obtain the width of the character for the specified point size.Methods inherited from class org.apache.fop.afp.fonts.AbstractOutlineFont
getAscender, getCapHeight, getCharacterSet, getCharacterSet, getDescender, getEncodingName, getUnderlinePosition, getUnderlineThickness, getXHeight, hasChar, mapCharMethods inherited from class org.apache.fop.afp.fonts.AFPFont
getEmbedFontName, getFamilyNames, getFontName, getFontType, getFontURI, getFullName, getKerningInfo, getStrikeoutPosition, getStrikeoutThickness, getWidths, hasKerningInfo, isEmbeddable, toString, toUnicodeCodepointMethods inherited from class org.apache.fop.fonts.Typeface
getMaxAscent, hadMappingOperations, hasFeature, isCID, isMultiByte, notifyMapOperation, setEventListener, warnMissingGlyph
-
Constructor Details
-
OutlineFont
public OutlineFont(String name, boolean embeddable, CharacterSet charSet, AFPEventProducer eventProducer) Construct outline font with specified name and character set.- Parameters:
name- font's nameembeddable- whether or not this font is embeddablecharSet- font's character seteventProducer- Handles any AFP related events
-
-
Method Details
-
getWidth
public int getWidth(int character, int size) Obtain the width of the character for the specified point size.- Parameters:
character- the charactersize- the font size (in mpt)- Returns:
- the width of the character for the specified point size
-
getBoundingBox
Description copied from class:AFPFontReturns the bounding box of the glyph at the given index, for the given font size.- Specified by:
getBoundingBoxin interfaceFontMetrics- Specified by:
getBoundingBoxin classAFPFont- Parameters:
character- glyph indexsize- font size- Returns:
- the scaled bounding box scaled in 1/1000ths of the given size
-