Package org.verapdf.pd.font
Class PDType0Font
java.lang.Object
org.verapdf.pd.PDObject
org.verapdf.pd.PDResource
org.verapdf.pd.font.PDFont
org.verapdf.pd.font.PDCIDFont
org.verapdf.pd.font.PDType0Font
Represents Type0 font on pd level. Note that on the cos level object of this
class is a COSDictionary of descendant font.
- Author:
- Sergey Shemyakov
-
Field Summary
Fields inherited from class org.verapdf.pd.font.PDFont
boundingBox, dictionary, encoding, fontDescriptor, fontProgram, isFontParsed, toUnicodeCMap -
Constructor Summary
ConstructorsConstructorDescriptionPDType0Font(COSDictionary dictionary) Constructs PD Type 0 font from font dictionary. -
Method Summary
Modifier and TypeMethodDescriptiongetCMap()voidsetFontProgramFromDescendant(PDCIDFont descendant) Updates font program information from descendant CID font.inttoCID(int code) Gets CID value for given character code from this font.toUnicode(int code) This method maps character code to a Unicode value.Methods inherited from class org.verapdf.pd.font.PDCIDFont
getCIDSet, getCIDSystemInfo, getCIDToGIDMap, getDefaultWidth, getFontProgram, getWidth, getWidthFromProgram, glyphIsPresent, readCodeMethods inherited from class org.verapdf.pd.font.PDFont
calculateEncodingMapping, cMapToUnicode, getAscent, getBoundingBox, getDescent, getDictionary, getDifferences, getDifferencesFromCosEncoding, getEncoding, getEncodingMapping, getFirstChar, getFontDescriptor, getFontWeight, getLastChar, getName, getNameWithoutSubset, getProgramSubtype, getSubtypeEntryValue, getType, getWidths, isSubset, isSuccessfullyParsed, isSymbolic, setSuccessfullyParsedMethods inherited from class org.verapdf.pd.PDResource
isInherited, setInheritedMethods inherited from class org.verapdf.pd.PDObject
clear, empty, getBooleanKey, getIntegerKey, getKey, getNameKey, getNameKeyStringValue, getRealKey, getStringKey, knownKey, removeKey, setBooleanKey, setIntegerKey, setKey, setNameKey, setObject, setObject, setStringKey, updateFromObject, updateToObject
-
Constructor Details
-
PDType0Font
Constructs PD Type 0 font from font dictionary.- Parameters:
dictionary-
-
-
Method Details
-
getCMap
- Returns:
- PD CMap associated with this Type 0 font as specified by Encoding key in font dictionary.
-
getDescendantFontObject
- Returns:
- COSObject that is font dictionary for descendant font.
-
getDescendantFont
- Returns:
- COSDictionary that is font dictionary for descendant font.
-
toUnicode
This method maps character code to a Unicode value. Firstly it checks toUnicode CMap, then it behaves like described in PDF32000_2008 9.10.2 "Mapping Character Codes to Unicode Values" for Type0 font. -
setFontProgramFromDescendant
Updates font program information from descendant CID font.- Parameters:
descendant- is descendant CID font for this Type 0 font.
-
getType0FontDict
- Returns:
- COSDictionary that is font dictionary of this Type 0 font.
-
getSubtype
- Overrides:
getSubtypein classPDFont- Returns:
- font subtype (Subtype entry).
-
toCID
public int toCID(int code) Gets CID value for given character code from this font.- Parameters:
code- is character code.- Returns:
- CID value for code.
-
getObject
-