Package org.verapdf.pd.font.truetype
Class PDTrueTypeFont
java.lang.Object
org.verapdf.pd.PDObject
org.verapdf.pd.PDResource
org.verapdf.pd.font.PDFont
org.verapdf.pd.font.PDSimpleFont
org.verapdf.pd.font.truetype.PDTrueTypeFont
Represents True Type font on PD level.
- Author:
- Sergey Shemyakov
-
Field Summary
Fields inherited from class org.verapdf.pd.font.PDFont
boundingBox, dictionary, encoding, fontDescriptor, fontProgram, isFontParsed, toUnicodeCMap -
Constructor Summary
ConstructorsConstructorDescriptionPDTrueTypeFont(COSDictionary dictionary) Constructor from true type font dictionary. -
Method Summary
Modifier and TypeMethodDescriptionfloatgetWidthFromProgram(int code) Gets width of given code from font program.booleanglyphIsPresent(int code) Checks if glyph for given code is present in this font.Methods inherited from class org.verapdf.pd.font.PDSimpleFont
toUnicodeMethods inherited from class org.verapdf.pd.font.PDFont
calculateEncodingMapping, cMapToUnicode, getAscent, getBoundingBox, getDefaultWidth, getDescent, getDictionary, getDifferences, getDifferencesFromCosEncoding, getEncoding, getEncodingMapping, getFirstChar, getFontDescriptor, getFontWeight, getLastChar, getName, getNameWithoutSubset, getProgramSubtype, getSubtype, getSubtypeEntryValue, getType, getWidth, getWidths, isSubset, isSuccessfullyParsed, isSymbolic, readCode, setSuccessfullyParsedMethods inherited from class org.verapdf.pd.PDResource
isInherited, setInheritedMethods inherited from class org.verapdf.pd.PDObject
clear, empty, getBooleanKey, getIntegerKey, getKey, getNameKey, getNameKeyStringValue, getObject, getRealKey, getStringKey, knownKey, removeKey, setBooleanKey, setIntegerKey, setKey, setNameKey, setObject, setObject, setStringKey, updateFromObject, updateToObject
-
Constructor Details
-
PDTrueTypeFont
Constructor from true type font dictionary.- Parameters:
dictionary- is true type font dictionary.
-
-
Method Details
-
getFontProgram
- Specified by:
getFontProgramin classPDFont- Returns:
- embedded font program fo this PDFont.
-
getWidthFromProgram
public float getWidthFromProgram(int code) Description copied from class:PDFontGets width of given code from font program.- Specified by:
getWidthFromProgramin classPDFont- Parameters:
code- is code of character in strings to display.- Returns:
- width of glyph for this code.
-
glyphIsPresent
public boolean glyphIsPresent(int code) Description copied from class:PDFontChecks if glyph for given code is present in this font.- Specified by:
glyphIsPresentin classPDFont- Parameters:
code- is code for glyph in this font.- Returns:
- true if glyph is present.
-