public class Type1FontProgram extends COSParser implements FontProgram
| Modifier and Type | Field and Description |
|---|---|
static Logger |
LOGGER |
document, flag, integers, keyOfCurrentObject, LINEARIZATION_DICTIONARY_LOOKUP_SIZE, objectssource| Constructor and Description |
|---|
Type1FontProgram(InputStream fileStream) |
Type1FontProgram(String fileName) |
| 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.
|
Set<String> |
getCharSet() |
String[] |
getEncoding() |
ASFileStreamCloser |
getFontProgramResource() |
String |
getGlyphName(int code)
Returns glyph name for glyph with given code.
|
float |
getWidth(int charCode)
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 is entry point for parsing process.
|
protected void |
readName() |
getArray, getDictionary, getDocument, getName, getStream, nextObjectappendToToken, clearToken, closeInputStream, findKeyword, findKeyword, getLine, getLine, getLineBytes, getRandomAccess, getRawBytes, getToken, initializeToken, isCR, isDigit, isDigit, isEndOfComment, isFF, isHexDigit, isLF, isNextByteEOL, nextToken, readNumber, readUntilDelimiter, skipExpectedCharacter, skipSingleEol, skipSpaces, skipSpaces, skipStreamSpacespublic static final Logger LOGGER
public Type1FontProgram(String fileName) throws IOException
IOExceptionpublic Type1FontProgram(InputStream fileStream) throws IOException
IOExceptionpublic void parseFont()
throws IOException
parseFont in interface FontProgramIOException - if stream reading error occurs.protected void readName()
throws IOException
readName in class BaseParserIOExceptionpublic float getWidth(int charCode)
FontProgramgetWidth in interface FontProgramcharCode - is code for glyph.public float getWidth(String glyphName)
FontProgramgetWidth in interface FontProgramglyphName - is name for glyph.public boolean containsCode(int code)
FontProgramcontainsCode 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 boolean isAttemptedParsing()
isAttemptedParsing in interface FontProgrampublic boolean isSuccessfulParsing()
isSuccessfulParsing in interface FontProgrampublic String[] getEncoding()
public String getGlyphName(int code)
FontProgramgetGlyphName in interface FontProgramcode - is code of glyph.public ASFileStreamCloser getFontProgramResource()
getFontProgramResource in interface FontProgramCopyright © 2015–2017 The veraPDF Consortium. All rights reserved.