public class NativeFont extends OutlineFont
Modifier and Type | Field and Description |
---|---|
protected static char[] |
controlChars
Control characters to filter out of the underlying font
|
protected static short[] |
mapIDs
the ids of our favorite CMaps
|
Constructor and Description |
---|
NativeFont(java.lang.String baseFont,
PDFObject fontObj,
PDFFontDescriptor descriptor)
create a new NativeFont object based on a description of the
font from the PDF file.
|
Modifier and Type | Method and Description |
---|---|
protected java.awt.geom.GeneralPath |
getOutline(char src,
float width)
Get a glyph outline by character code
Note this method must always return an outline
|
protected java.awt.geom.GeneralPath |
getOutline(java.lang.String name,
float width)
Get a glyph outline by name
|
protected void |
setFont(byte[] fontdata)
Set the font
|
protected void |
setFont(java.awt.Font f)
Set the font
|
getCharCount, getDefaultWidth, getFirstChar, getGlyph, getLastChar, getWidth
equals, getBaseFont, getCachedGlyph, getDescriptor, getEncoding, getFont, getGlyphs, getSubtype, getUnicodeMap, hashCode, setBaseFont, setDescriptor, setEncoding, setSubtype, setUnicodeMap, toString
protected static final char[] controlChars
protected static final short[] mapIDs
public NativeFont(java.lang.String baseFont, PDFObject fontObj, PDFFontDescriptor descriptor) throws java.io.IOException
java.io.IOException
protected java.awt.geom.GeneralPath getOutline(java.lang.String name, float width)
getOutline
in class OutlineFont
name
- the name of the desired glyphprotected java.awt.geom.GeneralPath getOutline(char src, float width)
getOutline
in class OutlineFont
src
- the character code of the desired glyphprotected void setFont(java.awt.Font f)
f
- the font to useprotected void setFont(byte[] fontdata) throws java.awt.FontFormatException, java.io.IOException
fontdata
- the font data as a byte arrayjava.awt.FontFormatException
java.io.IOException