public class CFFCIDFontProgram 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.
|
Integer |
getGid(int cid)
Gets glyph ID for given character ID.
|
int |
getNGlyphs() |
String |
getOrdering() |
String |
getRegistry() |
protected String |
getStringBySID(int sid) |
int |
getSupplement() |
float |
getWidth(int code)
Returns width of glyph for given character code.
|
float |
getWidth(String glyphName)
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 readTopDictTwoByteOps(int lastRead)
throws IOException
IOExceptionpublic Integer getGid(int cid)
cid - is character ID.public float getWidth(int code)
getWidth in interface FontProgramcode - is code for glyph.public float getWidth(String glyphName)
getWidth in interface FontProgramglyphName - is name for glyph.public boolean containsCode(int code)
containsCode in interface FontProgramcode - is character code.public int getSupplement()
public String getRegistry()
public String getOrdering()
protected void readTopDictUnit()
throws IOException
IOExceptionprotected void readTopDictOneByteOps(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.