public class CFFType1FontProgram extends Object implements FontProgram
| Modifier and Type | Field and Description |
|---|---|
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 CFFIndex |
localSubrIndex |
protected int |
nGlyphs |
protected int |
nominalWidthX |
protected long |
privateDictOffset |
protected long |
privateDictSize |
protected SeekableStream |
source |
protected ArrayList<CFFNumber> |
stack |
protected long |
subrsOffset |
protected long |
topDictBeginOffset |
protected long |
topDictEndOffset |
protected float[] |
widths |
| Modifier and Type | Method and Description |
|---|---|
boolean |
containsCode(int code)
Checks if font contains character with given ID.
|
String[] |
getCharSet() |
String[] |
getEncoding() |
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.
|
protected CFFNumber |
getWidthFromCharString(byte[] charString) |
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 void |
readLocalSubrsAndBias() |
protected CFFNumber |
readNumber() |
protected void |
readPrivateDictUnit() |
protected void |
readTopDictOneByteOps(int lastRead) |
protected void |
readTopDictTwoByteOps(int lastRead) |
protected void |
readTopDictUnit() |
protected static final float[] DEFAULT_FONT_MATRIX
protected CFFIndex globalSubrs
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 float[] widths
protected int defaultWidthX
protected int nominalWidthX
protected long subrsOffset
protected CFFIndex localSubrIndex
protected SeekableStream 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()
protected void readTopDictUnit()
throws IOException
IOExceptionprotected void readTopDictTwoByteOps(int lastRead)
throws IOException
IOExceptionprotected void readCharStrings()
throws IOException
IOExceptionprotected void readPrivateDictUnit()
throws IOException
IOExceptionprotected void readLocalSubrsAndBias()
throws IOException
IOExceptionprotected CFFNumber getWidthFromCharString(byte[] charString) throws IOException
IOExceptionpublic int getNGlyphs()
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–2016 The veraPDF Consortium. All rights reserved.