public class DoubleByteFont extends AbstractOutlineFont
AbstractOutlineFont
that supports double-byte fonts (CID Keyed font (Type 0)).
The width of characters that are not prescribed a width metrics in the font resource use
a fallback width. The default width is 1 em. A character can be supplied and queried for the
fallback width of all non-ideograph characters.charSet
eventListener, NOT_FOUND
Constructor and Description |
---|
DoubleByteFont(String name,
boolean embeddable,
CharacterSet charSet,
AFPEventProducer eventProducer)
Constructor for an double-byte outline font.
|
Modifier and Type | Method and Description |
---|---|
Rectangle |
getBoundingBox(int character,
int size)
Returns the bounding box of the glyph at the given index, for the given font size.
|
int |
getWidth(int character,
int size)
Return the width (in 1/1000ths of point size) of the character at
code point i.
|
getAscender, getCapHeight, getCharacterSet, getCharacterSet, getDescender, getEncodingName, getUnderlinePosition, getUnderlineThickness, getXHeight, hasChar, mapChar
getEmbedFontName, getFamilyNames, getFontName, getFontType, getFontURI, getFullName, getKerningInfo, getStrikeoutPosition, getStrikeoutThickness, getWidths, hasKerningInfo, isEmbeddable, toString, toUnicodeCodepoint
getMaxAscent, hadMappingOperations, hasFeature, isCID, isMultiByte, notifyMapOperation, setEventListener, warnMissingGlyph
public DoubleByteFont(String name, boolean embeddable, CharacterSet charSet, AFPEventProducer eventProducer)
name
- the name of the fontembeddable
- whether or not this font is embeddablecharSet
- the character seteventProducer
- Handles any AFP related eventspublic int getWidth(int character, int size)
character
- code point indexsize
- font sizepublic Rectangle getBoundingBox(int character, int size)
AFPFont
getBoundingBox
in interface FontMetrics
getBoundingBox
in class AFPFont
character
- glyph indexsize
- font sizeCopyright © 2025 Apache Software Foundation. All rights reserved.