public class Type1FontProgram extends PSParser implements FontProgram
| Modifier and Type | Field and Description |
|---|---|
static Logger |
LOGGER |
operandStack, userDictdocument, flag, integers, keyOfCurrentObject, objectsisPSParser, source| Constructor and Description |
|---|
Type1FontProgram(ASInputStream fileStream) |
| 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.
|
getObjectFromUserDictgetArray, getDictionary, getName, nextObjectclose, extendArray, findKeyword, findKeyword, getLineBytes, getToken, initializeToken, isCR, isDigit, isDigit, isEndOfComment, isFF, isLF, nextToken, readLine, readNumber, readUntilDelimiter, skipSpaces, skipSpaces, skipStreamSpacespublic static final Logger LOGGER
public Type1FontProgram(ASInputStream fileStream) throws IOException
IOExceptionpublic void parseFont()
throws IOException
parseFont in interface FontProgramIOException - if stream reading error occurs.public 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 Set<String> getCharSet()
public String getGlyphName(int code)
FontProgramgetGlyphName in interface FontProgramcode - is code of glyph.public ASFileStreamCloser getFontProgramResource()
getFontProgramResource in interface FontProgramCopyright © 2015–2020 The veraPDF Consortium. All rights reserved.