final class PDTrueTypeFontEmbedder extends TrueTypeEmbedder
Modifier and Type | Field and Description |
---|---|
private Encoding |
fontEncoding |
cmap, cmapLookup, fontDescriptor, ttf
Constructor and Description |
---|
PDTrueTypeFontEmbedder(PDDocument document,
COSDictionary dict,
TrueTypeFont ttf,
Encoding encoding)
Creates a new TrueType font embedder for the given TTF as a PDTrueTypeFont.
|
Modifier and Type | Method and Description |
---|---|
protected void |
buildSubset(java.io.InputStream ttfSubset,
java.lang.String tag,
java.util.Map<java.lang.Integer,java.lang.Integer> gidToCid)
Rebuild a font subset.
|
Encoding |
getFontEncoding()
Returns the font's encoding.
|
private void |
setWidths(COSDictionary font,
GlyphList glyphList)
Sets the glyph widths in the font dictionary.
|
addToSubset, buildFontFile2, getFontDescriptor, getTag, getTrueTypeFont, needsSubset, subset
private final Encoding fontEncoding
PDTrueTypeFontEmbedder(PDDocument document, COSDictionary dict, TrueTypeFont ttf, Encoding encoding) throws java.io.IOException
document
- The parent documentdict
- Font dictionaryttfStream
- TTF streamencoding
- The PostScript encoding vector to be used for embedding.java.io.IOException
- if the TTF could not be readprivate void setWidths(COSDictionary font, GlyphList glyphList) throws java.io.IOException
java.io.IOException
public Encoding getFontEncoding()
protected void buildSubset(java.io.InputStream ttfSubset, java.lang.String tag, java.util.Map<java.lang.Integer,java.lang.Integer> gidToCid) throws java.io.IOException
TrueTypeEmbedder
buildSubset
in class TrueTypeEmbedder
java.io.IOException