public class CFFType1FontProgram extends Object implements FontProgram
| Modifier and Type | Field and Description |
|---|---|
protected boolean |
attemptedParsing |
protected long |
charSetOffset |
protected CFFIndex |
charStrings |
protected long |
charStringsOffset |
protected int |
charStringType |
protected static float[] |
DEFAULT_FONT_MATRIX |
protected int |
defaultWidthX |
protected CFFIndex |
definedNames |
protected float[] |
fontMatrix |
protected CFFIndex |
globalSubrs |
protected boolean |
isSubset |
protected int |
nGlyphs |
protected int |
nominalWidthX |
protected long |
privateDictOffset |
protected long |
privateDictSize |
protected SeekableInputStream |
source |
protected ArrayList<CFFNumber> |
stack |
protected long |
subrsOffset |
protected boolean |
successfullyParsed |
protected long |
topDictBeginOffset |
protected long |
topDictEndOffset |
protected CharStringsWidths |
widths |
| Modifier and Type | Method and Description |
|---|---|
boolean |
containsCode(int code)
Checks if font contains character with given ID.
|
String[] |
getCharSet() |
String[] |
getEncoding() |
ASFileStreamCloser |
getFontProgramResource() |
int |
getNGlyphs() |
protected String |
getStringBySID(int sid) |
float |
getWidth(int charCode)
Returns width of glyph for given character code.
|
float |
getWidth(String charName)
Returns width of glyph for given glyph name.
|
boolean |
isAttemptedParsing() |
boolean |
isSuccessfulParsing() |
void |
parseFont()
This method does parsing of font, after it all the data needed should be
extracted.
|
protected int |
readCard16() |
protected int |
readCard8() |
protected void |
readCharStrings() |
protected void |
readHeader() |
protected CFFIndex |
readIndex() |
protected CFFNumber |
readNumber() |
protected void |
readPrivateDictUnit() |
protected void |
readTopDictOneByteOps(int lastRead) |
protected void |
readTopDictTwoByteOps(int lastRead) |
protected void |
readTopDictUnit() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetFontProgramResourceprotected boolean attemptedParsing
protected boolean successfullyParsed
protected static final float[] DEFAULT_FONT_MATRIX
protected CFFIndex globalSubrs
protected boolean isSubset
protected long privateDictOffset
protected long privateDictSize
protected long topDictBeginOffset
protected long topDictEndOffset
protected float[] fontMatrix
protected long charStringsOffset
protected long charSetOffset
protected int charStringType
protected int nGlyphs
protected CFFIndex charStrings
protected CharStringsWidths widths
protected int defaultWidthX
protected int nominalWidthX
protected long subrsOffset
protected SeekableInputStream source
protected CFFIndex definedNames
public void parseFont()
throws IOException
parseFont in interface FontProgramIOException - if error in font parsing occurs.protected void readTopDictOneByteOps(int lastRead)
public float getWidth(int charCode)
getWidth in interface FontProgramcharCode - is code for glyph.public float getWidth(String charName)
getWidth in interface FontProgramcharName - is name for glyph.public boolean containsCode(int code)
containsCode in interface FontProgramcode - is character code.public String[] getEncoding()
public String[] getCharSet()
public boolean isAttemptedParsing()
isAttemptedParsing in interface FontProgrampublic boolean isSuccessfulParsing()
isSuccessfulParsing in interface FontProgramprotected void readTopDictUnit()
throws IOException
IOExceptionprotected void readTopDictTwoByteOps(int lastRead)
throws IOException
IOExceptionprotected void readCharStrings()
throws IOException
IOExceptionprotected void readPrivateDictUnit()
throws IOException
IOExceptionpublic int getNGlyphs()
public ASFileStreamCloser getFontProgramResource()
protected int readCard8()
throws IOException
IOExceptionprotected int readCard16()
throws IOException
IOExceptionprotected CFFIndex readIndex() throws IOException
IOExceptionprotected void readHeader()
throws IOException
IOExceptionprotected CFFNumber readNumber() throws IOException
IOExceptionprotected String getStringBySID(int sid) throws IOException
IOExceptionCopyright © 2015–2017 The veraPDF Consortium. All rights reserved.