Top Description Fields Constructors Methods
org.apache.fontbox.ttf

public Class GlyphTable

extends TTFTable
Class Inheritance
Imports
java.io.IOException, org.apache.pdfbox.io.RandomAccessReadBuffer

This 'glyf'-table is a required table in a TrueType font.
Author
Ben Litchfield

Field Summary

Modifier and TypeField and Description
private int
private TTFDataStream
private GlyphData[]
private HorizontalMetricsTable
private IndexToLocationTable
private static final int
MAX_CACHE_SIZE

Don't even bother to cache huge fonts.

private static final int
MAX_CACHED_GLYPHS

Don't cache more glyphs than this.

private MaximumProfileTable
private int
public static final String
TAG

Tag to identify this table.

Inherited from org.apache.fontbox.ttf.TTFTable:
initialized

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
public GlyphData

Returns:

data of the glyph with the given GID or null
getGlyph
(int
GID
gid
)

Returns the data for the glyph with the given GID.

pack-priv GlyphData
getGlyph(int gid, int level)

private GlyphData
getGlyphData(int gid, int level)

pack-priv void
read(TrueTypeFont
The font that is being read.
ttf
,
TTFDataStream
The stream to read the data from.
data
)

Overrides org.apache.fontbox.ttf.TTFTable.read.

This will read the required data from the stream.

public void
setGlyphs(GlyphData[]
The glyphs to set.
glyphsValue
)

Inherited from org.apache.fontbox.ttf.TTFTable:
getCheckSumgetInitializedgetLengthgetOffsetgetTagreadHeaderssetCheckSumsetLengthsetOffsetsetTag

Field Detail

cachedback to summary
private int cached
databack to summary
private TTFDataStream data
glyphsback to summary
private GlyphData[] glyphs
hmtback to summary
private HorizontalMetricsTable hmt
locaback to summary
private IndexToLocationTable loca
MAX_CACHE_SIZEback to summary
private static final int MAX_CACHE_SIZE

Don't even bother to cache huge fonts.

MAX_CACHED_GLYPHSback to summary
private static final int MAX_CACHED_GLYPHS

Don't cache more glyphs than this.

maxpback to summary
private MaximumProfileTable maxp
numGlyphsback to summary
private int numGlyphs
TAGback to summary
public static final String TAG

Tag to identify this table.

Constructor Detail

GlyphTableback to summary
pack-priv GlyphTable()

Method Detail

getGlyphback to summary
public GlyphData getGlyph(int gid) throws IOException

Returns the data for the glyph with the given GID.

Parameters
gid:int

GID

Returns:GlyphData

data of the glyph with the given GID or null

Exceptions
IOException:
if the font cannot be read
getGlyphback to summary
pack-priv GlyphData getGlyph(int gid, int level) throws IOException
getGlyphDataback to summary
private GlyphData getGlyphData(int gid, int level) throws IOException
readback to summary
pack-priv void read(TrueTypeFont ttf, TTFDataStream data) throws IOException

Overrides org.apache.fontbox.ttf.TTFTable.read.

This will read the required data from the stream.

Parameters
ttf:TrueTypeFont

The font that is being read.

data:TTFDataStream

The stream to read the data from.

Annotations
@Override
Exceptions
IOException:
If there is an error reading the data.
setGlyphsback to summary
public void setGlyphs(GlyphData[] glyphsValue)
Parameters
glyphsValue:GlyphData[]

The glyphs to set.