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.
|
abstract org.apache.fontbox.FontBoxFont |
getFontBoxFont()
Returns the embedded or system font used for rendering.
|
GlyphList |
getGlyphList()
Returns the glyphlist.
|
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.
|
boolean |
hasExplicitWidth(int code)
Returns true if the Font dictionary specifies an explicit width for the given glyph.
|
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.
|
protected boolean |
isNonZeroBoundingBox(PDRectangle bbox) |
boolean |
isStandard14()
Returns true if this font is one of the "Standard 14" fonts and receives special handling.
|
boolean |
isSymbolic()
Returns true if 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, getCOSObject, getDisplacement, getFontDescriptor, getFontMatrix, getPositionVector, getSpaceWidth, getStandard14AFM, getStringWidth, getSubType, getToUnicodeCMap, getType, getWidth, getWidths, hashCode, readCMap, readCode, setFontDescriptor, toStringclone, finalize, getClass, notify, notifyAll, wait, wait, waitgetBoundingBox, getHeight, getName, getWidthFromFont, isDamaged, isEmbeddedprotected 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()
public final boolean isSymbolic()
protected Boolean isFontSymbolic()
protected final Boolean getSymbolicFlag()
public String toUnicode(int code)
PDFontpublic String toUnicode(int code, GlyphList customGlyphList)
PDFontpublic boolean isVertical()
PDFontisVertical in class PDFontprotected final float getStandard14Width(int code)
PDFontgetStandard14Width in class PDFontcode - character codepublic boolean isStandard14()
PDFontisStandard14 in class PDFontprotected boolean isNonZeroBoundingBox(PDRectangle bbox)
public abstract GeneralPath getPath(String name) throws IOException
name - glyph nameIOException - if the path could not be readpublic abstract boolean hasGlyph(String name) throws IOException
name - glyph nameIOException - if the path could not be readpublic abstract org.apache.fontbox.FontBoxFont getFontBoxFont()
public void addToSubset(int codePoint)
PDFontaddToSubset in class PDFontcodePoint - Unicode code pointpublic void subset()
throws IOException
PDFontsubset in class PDFontIOException - if the subset could not be writtenpublic boolean willBeSubset()
PDFontwillBeSubset in class PDFontpublic boolean hasExplicitWidth(int code)
throws IOException
PDFontLikecode - character codeIOException - if the font could not be readCopyright © 2002–2022 The Apache Software Foundation. All rights reserved.