public abstract class PDSimpleFont extends PDFont
Modifier and Type | Field and Description |
---|---|
protected Encoding |
encoding |
protected GlyphList |
glyphList |
DEFAULT_FONT_MATRIX, dict
Modifier and Type | Method and Description |
---|---|
void |
addToSubset(int codePoint)
Adds the given Unicode point to the subset.
|
Encoding |
getEncoding()
Returns the Encoding vector.
|
abstract org.apache.fontbox.FontBoxFont |
getFontBoxFont()
Returns the embedded or system font used for rendering.
|
GlyphList |
getGlyphList()
Returns the Encoding vector.
|
protected Map<String,Integer> |
getInvertedEncoding()
Inverts the font's Encoding.
|
abstract GeneralPath |
getPath(String name)
Returns the path for the character with the given name.
|
protected float |
getStandard14Width(int code)
Returns the glyph width from the AFM if this is a Standard 14 font.
|
protected Boolean |
getSymbolicFlag()
Returns the value of the symbolic flag, allowing for the fact that the result may be
indeterminate.
|
abstract boolean |
hasGlyph(String name)
Returns true if the font contains the character with the given name.
|
protected Boolean |
isFontSymbolic()
Internal implementation of isSymbolic, allowing for the fact that the result may be
indeterminate.
|
boolean |
isStandard14()
Returns true if this font is one of the "Standard 14" fonts and receives special handling.
|
boolean |
isSymbolic()
Returns true the font is a symbolic (that is, it does not use the Adobe Standard Roman
character set).
|
boolean |
isVertical()
Returns true if the font uses vertical writing mode.
|
protected void |
readEncoding()
Reads the Encoding from the Font dictionary or the embedded or substituted font file.
|
protected abstract Encoding |
readEncodingFromFont()
Called by readEncoding() if the encoding needs to be extracted from the font file.
|
void |
subset()
Replaces this font with a subset containing only the given Unicode characters.
|
String |
toUnicode(int code)
Returns the Unicode character sequence which corresponds to the given character code.
|
String |
toUnicode(int code,
GlyphList customGlyphList)
Returns the Unicode character sequence which corresponds to the given character code.
|
boolean |
willBeSubset()
Returns true if this font will be subset when embedded.
|
encode, encode, equals, getAverageFontWidth, getBoundingBox, getCOSObject, getDisplacement, getFontDescriptor, getFontMatrix, getHeight, getName, getPositionVector, getSpaceWidth, getStandard14AFM, getStringWidth, getSubType, getType, getWidth, getWidthFromFont, getWidths, hashCode, isDamaged, isEmbedded, readCMap, readCode, setFontDescriptor, toString
protected void readEncoding() throws IOException
IOException
- if the font file could not be readprotected abstract Encoding readEncodingFromFont() throws IOException
IOException
- if the font file could not be read.public Encoding getEncoding()
public GlyphList getGlyphList()
protected Map<String,Integer> getInvertedEncoding()
public final boolean isSymbolic()
protected Boolean isFontSymbolic()
protected final Boolean getSymbolicFlag()
public String toUnicode(int code) throws IOException
PDFont
toUnicode
in class PDFont
code
- character codeIOException
public String toUnicode(int code, GlyphList customGlyphList) throws IOException
PDFont
toUnicode
in class PDFont
code
- character codecustomGlyphList
- a custom glyph list to use instead of the Adobe Glyph ListIOException
public boolean isVertical()
PDFont
isVertical
in class PDFont
protected final float getStandard14Width(int code)
PDFont
getStandard14Width
in class PDFont
code
- character codepublic boolean isStandard14()
PDFont
isStandard14
in class PDFont
public abstract GeneralPath getPath(String name) throws IOException
IOException
- if the path could not be readpublic abstract boolean hasGlyph(String name) throws IOException
IOException
- if the path could not be readpublic abstract org.apache.fontbox.FontBoxFont getFontBoxFont()
public void addToSubset(int codePoint)
PDFont
addToSubset
in class PDFont
codePoint
- Unicode code pointpublic void subset() throws IOException
PDFont
subset
in class PDFont
IOException
- if the subset could not be writtenpublic boolean willBeSubset()
PDFont
willBeSubset
in class PDFont
Copyright © 2002–2015 The Apache Software Foundation. All rights reserved.