public class PdfType1Font extends PdfSimpleFont<Type1Font>
fontEncoding, forceWidthsOutput, shortTag, toUnicode
embedded, emptyBytes, fontProgram, newFont, notdefGlyphs, subset, subsetRanges
Modifier and Type | Method and Description |
---|---|
protected void |
addFontStream(PdfDictionary fontDescriptor)
If the embedded flag is false or if the font is one of the 14 built in types, it returns null , otherwise the font is read and output in a PdfStream object.
|
boolean |
containsGlyph(int unicode)
Check whether font contains glyph with specified unicode.
|
boolean |
containsGlyph(String text, int from)
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() |
boolean |
isSubset()
Indicates if all the glyphs and widths for that particular encoding should be included in the document.
|
void |
setSubset(boolean subset)
Indicates if all the glyphs and widths for that particular encoding should be included in the document.
|
appendAnyGlyph, appendGlyphs, convertToBytes, convertToBytes, convertToBytes, createGlyphLine, decode, decodeIntoGlyphLine, flushFontData, getContentWidth, getFontDescriptor, getFontEncoding, getFontProgram, isForceWidthsOutput, setFontProgram, setForceWidthsOutput, writeText, writeText
addSubsetRange, checkFontDictionary, checkTrueTypeFontDictionary, checkTrueTypeFontDictionary, compactRanges, containsGlyph, createSubsetPrefix, getAscent, getAscent, getDescent, getDescent, getFontMatrix, getPdfFontStream, getWidth, getWidth, getWidth, getWidth, isEmbedded, isWrappedObjectMustBeIndirect, splitString, splitString, toString, updateSubsetPrefix, writeText
ensureObjectIsAddedToDocument, ensureUnderlyingObjectHasIndirectReference, getPdfObject, isFlushed, makeIndirect, makeIndirect, markObjectAsIndirect, setForbidRelease, setModified, setPdfObject, unsetForbidRelease
public boolean isSubset()
PdfFont
public void setSubset(boolean subset)
PdfFont
true
only the glyphs used will be included in the font. When set to false
and PdfFont.addSubsetRange(int[])
was not called the full font will be included otherwise just the characters ranges will be included.
public void flush()
PdfFont
PdfObject
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 Glyph getGlyph(int unicode)
PdfFont
public boolean containsGlyph(String text, int from)
PdfFont
containsGlyph
in class PdfFont
text
- a java unicode string
from
- start index. one or two char may be used.
public boolean containsGlyph(int unicode)
PdfFont
containsGlyph
in class PdfFont
unicode
- a unicode code point
protected boolean isBuiltInFont()
isBuiltInFont
in class PdfSimpleFont<Type1Font>
protected void addFontStream(PdfDictionary fontDescriptor)
false
or if the font is one of the 14 built in types, it returns null
, otherwise the font is read and output in a PdfStream object.
addFontStream
in class PdfSimpleFont<Type1Font>
Copyright © 1998–2018 iText Group NV. All rights reserved.