COSObjectable
, PDFontLike
PDTrueTypeFont
, PDType1CFont
, PDType1Font
, PDType3Font
public abstract class PDSimpleFont extends PDFont
Modifier and Type | Field | Description |
---|---|---|
protected Encoding |
encoding |
|
protected GlyphList |
glyphList |
DEFAULT_FONT_MATRIX, dict
Modifier and Type | Method | 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.
|
abstract java.awt.geom.GeneralPath |
getPath(java.lang.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 java.lang.Boolean |
getSymbolicFlag() |
Returns the value of the symbolic flag, allowing for the fact that the result may be
indeterminate.
|
boolean |
hasExplicitWidth(int code) |
Returns true if the Font dictionary specifies an explicit width for the given glyph.
|
abstract boolean |
hasGlyph(java.lang.String name) |
Returns true if the font contains the character with the given name.
|
protected java.lang.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.
|
java.lang.String |
toUnicode(int code) |
Returns the Unicode character sequence which corresponds to the given character code.
|
java.lang.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.
|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
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 java.io.IOException
java.io.IOException
- if the font file could not be readprotected abstract Encoding readEncodingFromFont() throws java.io.IOException
java.io.IOException
- if the font file could not be read.public Encoding getEncoding()
public GlyphList getGlyphList()
public final boolean isSymbolic()
protected java.lang.Boolean isFontSymbolic()
protected final java.lang.Boolean getSymbolicFlag()
public java.lang.String toUnicode(int code) throws java.io.IOException
PDFont
public java.lang.String toUnicode(int code, GlyphList customGlyphList) throws java.io.IOException
PDFont
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 java.awt.geom.GeneralPath getPath(java.lang.String name) throws java.io.IOException
java.io.IOException
- if the path could not be readpublic abstract boolean hasGlyph(java.lang.String name) throws java.io.IOException
java.io.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 java.io.IOException
PDFont
public boolean willBeSubset()
PDFont
willBeSubset
in class PDFont
public boolean hasExplicitWidth(int code) throws java.io.IOException
PDFontLike
code
- character codejava.io.IOException
- if the font could not be readCopyright © 2002–2018. All rights reserved.