public abstract class PdfSimpleFontFontProgram> extends PdfFont
| Modifier and Type | Field and Description |
|---|---|
protected FontEncoding |
fontEncoding |
protected boolean |
forceWidthsOutput
Forces the output of the width array.
|
protected byte[] |
shortTag
The array used with single byte encodings.
|
embedded, emptyBytes, fontProgram, newFont, notdefGlyphs, subset, subsetRanges| Modifier | Constructor and Description |
|---|---|
protected |
PdfSimpleFont() |
protected |
PdfSimpleFont(PdfDictionary fontDictionary) |
| Modifier and Type | Method and Description |
|---|---|
protected abstract void |
addFontStream(PdfDictionary fontDescriptor) |
int |
appendAnyGlyph(String text, int from, List<Glyph> glyphs)
Append any single glyph, even notdef.
|
int |
appendGlyphs(String text, int from, int to, List<Glyph> glyphs)
Append all supported glyphs and return number of processed chars.
|
byte[] |
convertToBytes(Glyph glyph) |
byte[] |
convertToBytes(GlyphLine glyphLine) |
byte[] |
convertToBytes(String text)
Converts the text into bytes to be placed in the document.
|
GlyphLine |
createGlyphLine(String content) |
String |
decode(PdfString content) |
GlyphLine |
decodeIntoGlyphLine(PdfString content)
Decodes a given PdfString containing encoded string (e.g.
|
protected void |
flushFontData(String fontName, PdfName subtype) |
float |
getContentWidth(PdfString content) |
protected PdfDictionary |
getFontDescriptor(String fontName)
Generates the font descriptor for this font or null if it is one of the 14 built in fonts.
|
FontEncoding |
getFontEncoding() |
T |
getFontProgram() |
protected boolean |
isBuiltInFont() |
boolean |
isForceWidthsOutput()
Gets the state of the property.
|
protected void |
setFontProgram(T fontProgram) |
void |
setForceWidthsOutput(boolean forceWidthsOutput)
Set to true to force the generation of the widths array.
|
void |
writeText(GlyphLine text, int from, int to, PdfOutputStream stream) |
void |
writeText(String text, PdfOutputStream stream) |
addSubsetRange, checkFontDictionary, checkTrueTypeFontDictionary, checkTrueTypeFontDictionary, compactRanges, containsGlyph, containsGlyph, containsGlyph, createSubsetPrefix, flush, getAscent, getAscent, getDescent, getDescent, getFontMatrix, getGlyph, getPdfFontStream, getWidth, getWidth, getWidth, getWidth, isEmbedded, isSubset, isWrappedObjectMustBeIndirect, setSubset, splitString, splitString, toString, writeTextensureObjectIsAddedToDocument, ensureUnderlyingObjectHasIndirectReference, getPdfObject, isFlushed, makeIndirect, makeIndirect, markObjectAsIndirect, setForbidRelease, setModified, setPdfObject, unsetForbidReleaseprotected FontEncoding fontEncoding
protected boolean forceWidthsOutput
protected byte[] shortTag
protected PdfSimpleFont(PdfDictionary fontDictionary)
protected PdfSimpleFont()
public GlyphLine createGlyphLine(String content)
createGlyphLine in class PdfFont
public int appendGlyphs(String text, int from, int to, List<Glyph> glyphs)
PdfFont
appendGlyphs in class PdfFont
text - String to convert to glyphs.
from - from index of the text.
to - to index of the text.
glyphs - array for a new glyphs, shall not be null.
public int appendAnyGlyph(String text, int from, List<Glyph> glyphs)
PdfFont
appendAnyGlyph in class PdfFont
text - String to convert to glyphs.
from - from index of the text.
glyphs - array for a new glyph, shall not be null.
public T getFontProgram()
getFontProgram in class PdfFont
public FontEncoding getFontEncoding()
public byte[] convertToBytes(String text)
PdfFont
convertToBytes in class PdfFont
text - the text to convert
public byte[] convertToBytes(GlyphLine glyphLine)
convertToBytes in class PdfFont
public byte[] convertToBytes(Glyph glyph)
convertToBytes in class PdfFont
public void writeText(GlyphLine text, int from, int to, PdfOutputStream stream)
public void writeText(String text, PdfOutputStream stream)
public GlyphLine decodeIntoGlyphLine(PdfString content)
decodeIntoGlyphLine in class PdfFont
content - the encoded string
GlyphLine containing the glyphs encoded by the passed string
public float getContentWidth(PdfString content)
getContentWidth in class PdfFont
public boolean isForceWidthsOutput()
public void setForceWidthsOutput(boolean forceWidthsOutput)
true to force the generation of the widths array.
forceWidthsOutput - true to force the generation of the widths array
protected boolean isBuiltInFont()
protected PdfDictionary getFontDescriptor(String fontName)
null if it is one of the 14 built in fonts.
getFontDescriptor in class PdfFont
null.
protected abstract void addFontStream(PdfDictionary fontDescriptor)
protected void setFontProgram(T fontProgram)
Copyright © 1998–2017 iText Group NV. All rights reserved.