public class CFFCIDFontProgram 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 |
containsCID(int cid)
Method works only for fonts where cid notation is used.
|
boolean |
containsCode(int code)
Checks if font contains character with given code.
|
boolean |
containsGlyph(String glyphName)
Checks if this font program has glyph for given glyph name.
|
List<Integer> |
getCIDList() |
ASFileStreamCloser |
getFontProgramResource() |
String |
getGlyphName(int code)
Returns glyph name for glyph with given code.
|
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.
|
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 readTopDictTwoByteOps(int lastRead)
throws IOException
IOExceptionpublic 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 String getGlyphName(int code)
FontProgramgetGlyphName in interface FontProgramcode - is code of glyph.public boolean containsCode(int code)
containsCode in interface FontProgramcode - is character code.public boolean containsGlyph(String glyphName)
FontProgramcontainsGlyph in interface FontProgramglyphName - is the name of glyph.public boolean containsCID(int cid)
FontProgramcontainsCID in interface FontProgrampublic int getSupplement()
public String getRegistry()
public String getOrdering()
public boolean isAttemptedParsing()
isAttemptedParsing in interface FontProgrampublic boolean isSuccessfulParsing()
isSuccessfulParsing in interface FontProgramprotected void readTopDictUnit()
throws IOException
IOExceptionprotected void readTopDictOneByteOps(int lastRead)
protected 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–2020 The veraPDF Consortium. All rights reserved.