Modifier and Type | Field and Description |
---|---|
private PDFont |
font |
private java.util.Map<java.lang.Integer,java.awt.geom.GeneralPath> |
glyphs |
private boolean |
hasScaling |
private boolean |
isCIDFont |
private static org.apache.commons.logging.Log |
LOG |
private float |
scale |
private TrueTypeFont |
ttf |
private PDVectorFont |
vectorFont |
Modifier | Constructor and Description |
---|---|
(package private) |
TTFGlyph2D(PDTrueTypeFont ttfFont)
Constructor.
|
(package private) |
TTFGlyph2D(PDType0Font type0Font)
Constructor.
|
private |
TTFGlyph2D(TrueTypeFont ttf,
PDFont font,
boolean isCIDFont) |
Modifier and Type | Method and Description |
---|---|
void |
dispose()
Remove all cached resources.
|
private int |
getGIDForCharacterCode(int code) |
java.awt.geom.GeneralPath |
getPathForCharacterCode(int code)
Returns the path describing the glyph for the given character code.
|
java.awt.geom.GeneralPath |
getPathForGID(int gid,
int code)
Returns the path describing the glyph for the given glyphId.
|
private static final org.apache.commons.logging.Log LOG
private final PDFont font
private final TrueTypeFont ttf
private PDVectorFont vectorFont
private float scale
private boolean hasScaling
private final java.util.Map<java.lang.Integer,java.awt.geom.GeneralPath> glyphs
private final boolean isCIDFont
TTFGlyph2D(PDTrueTypeFont ttfFont) throws java.io.IOException
ttfFont
- TrueType fontjava.io.IOException
TTFGlyph2D(PDType0Font type0Font) throws java.io.IOException
type0Font
- Type0 font, with CIDFontType2 descendantjava.io.IOException
private TTFGlyph2D(TrueTypeFont ttf, PDFont font, boolean isCIDFont) throws java.io.IOException
java.io.IOException
public java.awt.geom.GeneralPath getPathForCharacterCode(int code) throws java.io.IOException
Glyph2D
getPathForCharacterCode
in interface Glyph2D
code
- the character codejava.io.IOException
private int getGIDForCharacterCode(int code) throws java.io.IOException
java.io.IOException
public java.awt.geom.GeneralPath getPathForGID(int gid, int code) throws java.io.IOException
gid
- the GIDcode
- the character codejava.io.IOException