public abstract class PdfSimpleFont<T extends FontProgram> 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) |
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) |
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, createSubsetPrefix, getAscent, getAscent, getDescent, getDescent, getFontMatrix, getGlyph, getPdfFontStream, getWidth, getWidth, getWidth, getWidth, isEmbedded, isSubset, isWrappedObjectMustBeIndirect, setSubset, splitString, writeTextensureObjectIsAddedToDocument, flush, 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 PdfFontpublic T getFontProgram()
getFontProgram in class PdfFontpublic FontEncoding getFontEncoding()
public byte[] convertToBytes(String text)
PdfFontconvertToBytes in class PdfFonttext - the text to convertpublic byte[] convertToBytes(GlyphLine glyphLine)
convertToBytes in class PdfFontpublic byte[] convertToBytes(Glyph glyph)
convertToBytes in class PdfFontpublic void writeText(GlyphLine text, int from, int to, PdfOutputStream stream)
public void writeText(String text, PdfOutputStream stream)
public float getContentWidth(PdfString content)
getContentWidth in class PdfFontpublic 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 arrayprotected boolean isBuiltInFont()
protected PdfDictionary getFontDescriptor(String fontName)
null if it is one of the 14 built in fonts.getFontDescriptor in class PdfFontnull.protected abstract void addFontStream(PdfDictionary fontDescriptor)
protected void setFontProgram(T fontProgram)
Copyright © 1998–2016 iText Group NV. All rights reserved.