public abstract class PDFont extends PDResource
| Modifier and Type | Field and Description |
|---|---|
protected COSDictionary |
dictionary |
protected Encoding |
encoding |
protected PDFontDescriptor |
fontDescriptor |
protected FontProgram |
fontProgram |
protected boolean |
isFontParsed |
protected PDCMap |
toUnicodeCMap |
| Constructor and Description |
|---|
PDFont(COSDictionary dictionary)
Constructor from COSDictionary.
|
| Modifier and Type | Method and Description |
|---|---|
Double |
getDefaultWidth() |
COSDictionary |
getDictionary() |
Map<Integer,String> |
getDifferences() |
static Map<Integer,String> |
getDifferencesFromCosEncoding(COSObject e) |
COSObject |
getEncoding() |
Encoding |
getEncodingMapping() |
static Encoding |
getEncodingMappingFromCOSObject(COSObject e) |
Long |
getFirstChar() |
PDFontDescriptor |
getFontDescriptor() |
COSStream |
getFontFile2() |
ASAtom |
getFontName() |
abstract FontProgram |
getFontProgram() |
Long |
getLastChar() |
String |
getName() |
ASAtom |
getSubtype() |
String |
getType() |
Double |
getWidth(int code) |
COSObject |
getWidths() |
protected boolean |
isSubset() |
boolean |
isSuccessfullyParsed() |
boolean |
isSymbolic() |
int |
readCode(InputStream stream)
Method reads next character code from stream according to font data.
|
void |
setSuccessfullyParsed(boolean successfullyParsed) |
String |
toUnicode(int code)
Gets Unicode string for given character code.
|
isInherited, setInheritedclear, empty, getBooleanKey, getIntegerKey, getKey, getNameKey, getObject, getRealKey, getStringKey, knownKey, removeKey, setBooleanKey, setIntegerKey, setKey, setNameKey, setObject, setObject, setStringKey, updateFromObject, updateToObjectprotected COSDictionary dictionary
protected PDFontDescriptor fontDescriptor
protected PDCMap toUnicodeCMap
protected boolean isFontParsed
protected FontProgram fontProgram
protected Encoding encoding
public PDFont(COSDictionary dictionary)
dictionary - is font dictionary.public COSDictionary getDictionary()
public PDFontDescriptor getFontDescriptor()
public String getType()
public ASAtom getSubtype()
public ASAtom getFontName()
IllegalStateException - if font names specified in font dictionary
and font descriptor are different.public boolean isSymbolic()
public Encoding getEncodingMapping()
public String getName()
public COSObject getEncoding()
public COSStream getFontFile2()
public static Map<Integer,String> getDifferencesFromCosEncoding(COSObject e)
public COSObject getWidths()
public Long getFirstChar()
public Long getLastChar()
public int readCode(InputStream stream) throws IOException
stream - is stream with raw data.IOException - if reading fails.public abstract FontProgram getFontProgram()
public String toUnicode(int code)
code - is code for character.public Double getWidth(int code)
public Double getDefaultWidth()
public boolean isSuccessfullyParsed()
public void setSuccessfullyParsed(boolean successfullyParsed)
protected boolean isSubset()
Copyright © 2015–2017 The veraPDF Consortium. All rights reserved.