Package com.itextpdf.kernel.font
Class PdfType1Font
java.lang.Object
-
Field Summary
Fields inherited from class com.itextpdf.kernel.font.PdfSimpleFont
fontEncoding, forceWidthsOutput, toUnicode, usedGlyphsFields inherited from class com.itextpdf.kernel.font.PdfFont
embedded, EMPTY_BYTES, fontProgram, newFont, notdefGlyphs, SIMPLE_FONT_MAX_CHAR_CODE_VALUE, subset, subsetRanges -
Method Summary
Modifier and TypeMethodDescriptionprotected voidaddFontStream(PdfDictionary fontDescriptor) If the embedded flag isfalseor if the font is one of the 14 built in types, it returnsnull, otherwise the font is read and output in a PdfStream object.booleancontainsGlyph(int unicode) Check whether font contains glyph with specified unicode.voidflush()To manually flush aPdfObjectbehind this wrapper, you have to ensure that this object is added to the document, i.e.getGlyph(int unicode) Get glyph by unicodeprotected booleanIndicates that the font is built in, i.e.booleanisSubset()Indicates if all the glyphs and widths for that particular encoding should be included in the document.voidsetSubset(boolean subset) Indicates if all the glyphs and widths for that particular encoding should be included in the document.Methods inherited from class com.itextpdf.kernel.font.PdfSimpleFont
appendAnyGlyph, appendDecodedCodesToGlyphsList, appendGlyphs, buildWidthsArray, convertToBytes, convertToBytes, convertToBytes, createGlyphLine, decode, decodeIntoGlyphLine, flushFontData, getContentWidth, getFontDescriptor, getFontEncoding, getToUnicode, isBuiltWith, isForceWidthsOutput, setFontProgram, setForceWidthsOutput, writeText, writeTextMethods inherited from class com.itextpdf.kernel.font.PdfFont
addSubsetRange, getAscent, getAscent, getDescent, getDescent, getFontProgram, getPdfFontStream, getWidth, getWidth, getWidth, getWidth, isEmbedded, isWrappedObjectMustBeIndirect, splitString, toString, updateSubsetPrefixMethods inherited from class com.itextpdf.kernel.pdf.PdfObjectWrapper
ensureObjectIsAddedToDocument, ensureUnderlyingObjectHasIndirectReference, getPdfObject, isFlushed, makeIndirect, makeIndirect, markObjectAsIndirect, setForbidRelease, setModified, setPdfObject, unsetForbidRelease
-
Method Details
-
isSubset
public boolean isSubset()Description copied from class:PdfFontIndicates if all the glyphs and widths for that particular encoding should be included in the document. -
setSubset
public void setSubset(boolean subset) Description copied from class:PdfFontIndicates if all the glyphs and widths for that particular encoding should be included in the document. When set totrueonly the glyphs used will be included in the font. When set tofalsethe full font will be included and all subset ranges will be removed. -
flush
public void flush()Description copied from class:PdfFontTo manually flush aPdfObjectbehind 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 callPdfObjectWrapper.makeIndirect(PdfDocument). For example: wrapperInstance.makeIndirect(document).flush(); Note that not every wrapper require this, only those that have such warning in documentation. -
getGlyph
Description copied from class:PdfFontGet glyph by unicode -
containsGlyph
public boolean containsGlyph(int unicode) Description copied from class:PdfFontCheck whether font contains glyph with specified unicode.- Overrides:
-
containsGlyphin classPdfFont - Parameters:
-
unicode- a unicode code point - Returns:
- true if font contains glyph, represented with the unicode code point, otherwise false.
-
isBuiltInFont
protected boolean isBuiltInFont()Indicates that the font is built in, i.e. it is one of the 14 Standard fonts- Overrides:
-
isBuiltInFontin classPdfSimpleFont<Type1Font> - Returns:
-
truein case the font is a Standard font andfalseotherwise
-
addFontStream
If the embedded flag isfalseor if the font is one of the 14 built in types, it returnsnull, otherwise the font is read and output in a PdfStream object.- Specified by:
-
addFontStreamin classPdfSimpleFont<Type1Font>
-