public class GlyphTable extends TTFTable
Modifier and Type | Field and Description |
---|---|
private int |
cached |
private TTFDataStream |
data |
private GlyphData[] |
glyphs |
private IndexToLocationTable |
loca |
private static int |
MAX_CACHE_SIZE
Don't even bother to cache huge fonts.
|
private static int |
MAX_CACHED_GLYPHS
Don't cache more glyphs than this.
|
private int |
numGlyphs |
static java.lang.String |
TAG
Tag to identify this table.
|
font, initialized
Constructor and Description |
---|
GlyphTable(TrueTypeFont font) |
Modifier and Type | Method and Description |
---|---|
GlyphData |
getGlyph(int gid)
Returns the data for the glyph with the given GID.
|
private GlyphData |
getGlyphData(int gid) |
GlyphData[] |
getGlyphs()
Returns all glyphs.
|
(package private) void |
read(TrueTypeFont ttf,
TTFDataStream data)
This will read the required data from the stream.
|
void |
setGlyphs(GlyphData[] glyphsValue) |
getCheckSum, getInitialized, getLength, getOffset, getTag, setCheckSum, setLength, setOffset, setTag
public static final java.lang.String TAG
private GlyphData[] glyphs
private TTFDataStream data
private IndexToLocationTable loca
private int numGlyphs
private int cached
private static final int MAX_CACHE_SIZE
private static final int MAX_CACHED_GLYPHS
GlyphTable(TrueTypeFont font)
void read(TrueTypeFont ttf, TTFDataStream data) throws java.io.IOException
public GlyphData[] getGlyphs() throws java.io.IOException
java.io.IOException
- If there is an error reading the data.public void setGlyphs(GlyphData[] glyphsValue)
glyphsValue
- The glyphs to set.public GlyphData getGlyph(int gid) throws java.io.IOException
gid
- GIDjava.io.IOException
- if the font cannot be readprivate GlyphData getGlyphData(int gid) throws java.io.IOException
java.io.IOException