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.
|
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 static Encoding getEncodingMappingFromCOSObject(COSObject e)
e - is value of Encoding key in font dictionary.public String getName()
public COSObject getEncoding()
public COSStream getFontFile2()
public Map<Integer,String> getDifferences()
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 ASAtom getProgramSubtype()
public Double getWidth(int code)
code - is code of glyph.public Double getDefaultWidth()
public boolean isSuccessfullyParsed()
public void setSuccessfullyParsed(boolean successfullyParsed)
protected boolean isSubset()
Copyright © 2015–2017 The veraPDF Consortium. All rights reserved.