public class PdfTrueTypeFont extends PdfSimpleFont<TrueTypeFont>
fontEncoding, forceWidthsOutput, toUnicode, usedGlyphsembedded, EMPTY_BYTES, fontProgram, newFont, notdefGlyphs, SIMPLE_FONT_MAX_CHAR_CODE_VALUE, subset, subsetRanges| Modifier and Type | Method and Description |
|---|---|
protected void |
addFontStream(PdfDictionary fontDescriptor) |
boolean |
containsGlyph(int unicode)
Check whether font contains glyph with specified unicode.
|
void |
flush()
To manually flush a
PdfObject behind this wrapper, you have to ensure
that this object is added to the document, i.e. |
Glyph |
getGlyph(int unicode)
Get glyph by unicode
|
protected boolean |
isBuiltInFont()
Indicates that the font is built in, i.e.
|
boolean |
isBuiltWith(String fontProgram,
String encoding)
Checks whether the
PdfFont was built with corresponding fontProgram and encoding or CMAP. |
appendAnyGlyph, appendDecodedCodesToGlyphsList, appendGlyphs, buildWidthsArray, convertToBytes, convertToBytes, convertToBytes, createGlyphLine, decode, decodeIntoGlyphLine, flushFontData, getContentWidth, getFontDescriptor, getFontEncoding, getToUnicode, isForceWidthsOutput, setFontProgram, setForceWidthsOutput, writeText, writeTextaddSubsetRange, getAscent, getAscent, getDescent, getDescent, getFontProgram, getPdfFontStream, getWidth, getWidth, getWidth, getWidth, isEmbedded, isSubset, isWrappedObjectMustBeIndirect, setSubset, splitString, toString, updateSubsetPrefixensureObjectIsAddedToDocument, ensureUnderlyingObjectHasIndirectReference, getPdfObject, isFlushed, makeIndirect, makeIndirect, markObjectAsIndirect, setForbidRelease, setModified, setPdfObject, unsetForbidReleasepublic Glyph getGlyph(int unicode)
PdfFontpublic boolean containsGlyph(int unicode)
PdfFontcontainsGlyph in class PdfFontunicode - a unicode code pointpublic void flush()
PdfFontPdfObject behind this wrapper, you have to ensure
that this object is added to the document, i.e. it has an indirect reference.
Basically this means that before flushing you need to explicitly call PdfObjectWrapper.makeIndirect(PdfDocument).
For example: wrapperInstance.makeIndirect(document).flush();
Note that not every wrapper require this, only those that have such warning in documentation.public boolean isBuiltWith(String fontProgram, String encoding)
PdfFontPdfFont was built with corresponding fontProgram and encoding or CMAP.
Default value is false unless overridden.isBuiltWith in class PdfSimpleFont<TrueTypeFont>fontProgram - a font name or path to a font programencoding - an encoding or CMAPPdfDocument.findFont(String, String),
FontProgram.isBuiltWith(String),
FontEncoding.isBuiltWith(String),
CMapEncoding.isBuiltWith(String)protected void addFontStream(PdfDictionary fontDescriptor)
addFontStream in class PdfSimpleFont<TrueTypeFont>protected boolean isBuiltInFont()
isBuiltInFont in class PdfSimpleFont<TrueTypeFont>true in case the font is a Standard font and false otherwiseCopyright © 1998–2025 Apryse Group NV. All rights reserved.