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,
Encoding pdfEncoding) |
Type1FontProgram(String fileName) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
containsCode(int code)
Checks if font contains character with given ID.
|
String[] |
getCharSet() |
String[] |
getEncoding() |
ASFileStreamCloser |
getFontProgramResource() |
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.
|
getArray, getDictionary, getDocument, getName, getStream, nextObjectcloseInputStream, findKeyword, findKeyword, getLine, getLine, getLineBytes, getRandomAccess, getRawBytes, getToken, initializeToken, isCR, isDigit, isDigit, 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, Encoding pdfEncoding) 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 isAttemptedParsing()
isAttemptedParsing in interface FontProgrampublic boolean isSuccessfulParsing()
isSuccessfulParsing in interface FontProgrampublic String[] getEncoding()
public String[] getCharSet()
public ASFileStreamCloser getFontProgramResource()
getFontProgramResource in interface FontProgramCopyright © 2015–2017 The veraPDF Consortium. All rights reserved.