Package com.itextpdf.kernel.font
Class DocTrueTypeFont
- java.lang.Object
-
- com.itextpdf.io.font.FontProgram
-
- com.itextpdf.io.font.TrueTypeFont
-
- com.itextpdf.kernel.font.DocTrueTypeFont
-
- All Implemented Interfaces:
IDocFontProgram
public class DocTrueTypeFont extends TrueTypeFont implements IDocFontProgram
-
-
Field Summary
Fields Modifier and Type Field Description private PdfStreamfontFileprivate PdfNamefontFileNameprivate intmissingWidthprivate PdfNamesubtype-
Fields inherited from class com.itextpdf.io.font.TrueTypeFont
bBoxes, isVertical, kerning
-
Fields inherited from class com.itextpdf.io.font.FontProgram
avgWidth, codeToGlyph, DEFAULT_WIDTH, encodingScheme, fontIdentification, fontMetrics, fontNames, HORIZONTAL_SCALING_FACTOR, isFontSpecific, registry, unicodeToGlyph, UNITS_NORMALIZATION
-
-
Constructor Summary
Constructors Modifier Constructor Description privateDocTrueTypeFont(PdfDictionary fontDictionary)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description (package private) static TrueTypeFontcreateFontProgram(PdfDictionary fontDictionary, CMapToUnicode toUnicode)(package private) static TrueTypeFontcreateFontProgram(PdfDictionary fontDictionary, FontEncoding fontEncoding, CMapToUnicode toUnicode)(package private) static voidfillFontDescriptor(DocTrueTypeFont font, PdfDictionary fontDesc)(package private) static intgetDefaultWithOfFont(PdfDictionary fontDictionary, PdfDictionary fontDescriptor)PdfStreamgetFontFile()PdfNamegetFontFileName()intgetMissingWidth()PdfNamegetSubtype()booleanisBuiltWith(java.lang.String fontName)Returns false, because we cannot rely on an actual font subset and font name.private voidregisterGlyph(int cid, int width, char[] unicode)-
Methods inherited from class com.itextpdf.io.font.TrueTypeFont
close, getActiveCmap, getCodePagesSupported, getDirectoryOffset, getFontStreamBytes, getGdefTable, getGposTable, getGsubTable, getKerning, getNumberOfCmaps, getPdfFontFlags, getSubset, hasKernPairs, isCff, isCmapPresent, mapGlyphsCidsToGids, readGdefTable, readGposTable, readGsubTable, updateUsedGlyphs
-
Methods inherited from class com.itextpdf.io.font.FontProgram
convertGlyphSpaceToTextSpace, convertGlyphSpaceToTextSpace, convertGlyphSpaceToTextSpace, convertTextSpaceToGlyphSpace, countOfGlyphs, fixSpaceIssue, getAvgWidth, getCharBBox, getFontIdentification, getFontMetrics, getFontNames, getGlyph, getGlyphByCode, getKerning, getRegistry, getWidth, isFontSpecific, setBbox, setBold, setCapHeight, setFixedPitch, setFontFamily, setFontName, setFontStretch, setFontWeight, setItalicAngle, setRegistry, setStemH, setStemV, setTypoAscender, setTypoDescender, setXHeight, toString
-
-
-
-
Constructor Detail
-
DocTrueTypeFont
private DocTrueTypeFont(PdfDictionary fontDictionary)
-
-
Method Detail
-
createFontProgram
static TrueTypeFont createFontProgram(PdfDictionary fontDictionary, FontEncoding fontEncoding, CMapToUnicode toUnicode)
-
getDefaultWithOfFont
static int getDefaultWithOfFont(PdfDictionary fontDictionary, PdfDictionary fontDescriptor)
-
createFontProgram
static TrueTypeFont createFontProgram(PdfDictionary fontDictionary, CMapToUnicode toUnicode)
-
getFontFile
public PdfStream getFontFile()
- Specified by:
getFontFilein interfaceIDocFontProgram
-
getFontFileName
public PdfName getFontFileName()
- Specified by:
getFontFileNamein interfaceIDocFontProgram
-
getSubtype
public PdfName getSubtype()
- Specified by:
getSubtypein interfaceIDocFontProgram
-
isBuiltWith
public boolean isBuiltWith(java.lang.String fontName)
Returns false, because we cannot rely on an actual font subset and font name.- Overrides:
isBuiltWithin classTrueTypeFont- Parameters:
fontName- a font name or path to a font program- Returns:
- return false.
-
getMissingWidth
public int getMissingWidth()
-
fillFontDescriptor
static void fillFontDescriptor(DocTrueTypeFont font, PdfDictionary fontDesc)
-
registerGlyph
private void registerGlyph(int cid, int width, char[] unicode)
-
-