public abstract class BaseTrueTypeProgram extends Object implements FontProgram
| Modifier and Type | Field and Description |
|---|---|
protected String[] |
encodingMappingArray |
protected org.verapdf.pd.font.truetype.TrueTypeFontParser |
parser |
protected float[] |
widths |
| Constructor and Description |
|---|
BaseTrueTypeProgram(ASInputStream stream)
Constructor from stream containing font data, and encoding details.
|
| Modifier and Type | Method and Description |
|---|---|
ASFileStreamCloser |
getFontProgramResource() |
int |
getNGlyphs() |
int |
getNrOfCMaps() |
protected float |
getWidthWithCheck(int gid) |
boolean |
isAttemptedParsing() |
boolean |
isCmapPresent(int platformID,
int encodingID)
Returns true if cmap table with given platform ID and encoding ID is
present in the font.
|
boolean |
isSuccessfulParsing() |
void |
parseFont()
Parses True Type font from given stream and extracts all the data needed.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcontainsCID, containsCode, containsGlyph, getGlyphName, getWidth, getWidthprotected float[] widths
protected org.verapdf.pd.font.truetype.TrueTypeFontParser parser
protected String[] encodingMappingArray
public BaseTrueTypeProgram(ASInputStream stream) throws IOException
stream - is stream containing font data.IOException - if creation of @{link SeekableStream} fails.public void parseFont()
throws IOException
parseFont in interface FontProgramIOException - if stream-reading error occurs.public int getNrOfCMaps()
public int getNGlyphs()
public boolean isCmapPresent(int platformID,
int encodingID)
platformID - is platform ID of requested cmap.encodingID - is encoding ID of requested cmap.protected float getWidthWithCheck(int gid)
public boolean isAttemptedParsing()
isAttemptedParsing in interface FontProgrampublic boolean isSuccessfulParsing()
isSuccessfulParsing in interface FontProgrampublic ASFileStreamCloser getFontProgramResource()
getFontProgramResource in interface FontProgramCopyright © 2015–2019 The veraPDF Consortium. All rights reserved.