public class TrueTypeFont extends FontProgram
Modifier and Type | Field and Description |
---|---|
protected int[][] |
bBoxes |
protected boolean |
isVertical |
protected IntHashtable |
kerning
The map containing the kerning information.
|
avgWidth, codeToGlyph, DEFAULT_WIDTH, encodingScheme, fontIdentification, fontMetrics, fontNames, isFontSpecific, registry, unicodeToGlyph, UNITS_NORMALIZATION
Modifier | Constructor and Description |
---|---|
protected |
TrueTypeFont() |
|
TrueTypeFont(byte[] ttf) |
|
TrueTypeFont(String path) |
Modifier and Type | Method and Description |
---|---|
void |
close() |
Map<Integer,int[]> |
getActiveCmap() |
String[] |
getCodePagesSupported()
Gets the code pages supported by the font.
|
int |
getDirectoryOffset()
The offset from the start of the file to the table directory.
|
byte[] |
getFontStreamBytes() |
OpenTypeGdefTableReader |
getGdefTable() |
GlyphPositioningTableReader |
getGposTable() |
GlyphSubstitutionTableReader |
getGsubTable() |
int |
getKerning(Glyph first, Glyph second)
Gets the kerning between two glyphs.
|
int |
getPdfFontFlags() |
byte[] |
getSubset(Set<Integer> glyphs, boolean subset) |
boolean |
hasKernPairs() |
boolean |
isCff() |
protected void |
readGdefTable() |
protected void |
readGposTable() |
protected void |
readGsubTable() |
checkFilePath, countOfGlyphs, fixSpaceIssue, getAvgWidth, getBaseName, getCharBBox, getFontIdentification, getFontMetrics, getFontNames, getGlyph, getGlyphByCode, getKerning, getRegistry, getWidth, isFontSpecific, setBbox, setBold, setCapHeight, setFixedPitch, setFontFamily, setFontName, setFontWeight, setFontWidth, setItalicAngle, setRegistry, setStemH, setStemV, setTypoAscender, setTypoDescender, setXHeight, toString
protected int[][] bBoxes
protected boolean isVertical
protected IntHashtable kerning
Integer
where the top 16 bits are the glyph number for the first character and the lower 16 bits are the glyph number for the second character. The value is the amount of kerning in normalized 1000 units as an Integer
. This value is usually negative.
protected TrueTypeFont()
public TrueTypeFont(String path) throws IOException
IOException
public TrueTypeFont(byte[] ttf) throws IOException
IOException
public boolean hasKernPairs()
hasKernPairs
in class FontProgram
public int getKerning(Glyph first, Glyph second)
getKerning
in class FontProgram
first
- the first glyph
second
- the second glyph
public boolean isCff()
public byte[] getFontStreamBytes()
public int getPdfFontFlags()
getPdfFontFlags
in class FontProgram
public int getDirectoryOffset()
public GlyphSubstitutionTableReader getGsubTable()
public GlyphPositioningTableReader getGposTable()
public OpenTypeGdefTableReader getGdefTable()
protected void readGdefTable() throws IOException
IOException
protected void readGsubTable() throws IOException
IOException
protected void readGposTable() throws IOException
IOException
public String[] getCodePagesSupported()
public void close() throws IOException
IOException
Copyright © 1998–2017 iText Group NV. All rights reserved.