public static class LocaTable.Builder extends Table.Builder<LocaTable>
Modifier and Type | Method and Description |
---|---|
static LocaTable.Builder |
createBuilder(Header header,
WritableFontData data)
Create a new builder using the header information and data provided.
|
FontHeaderTable.IndexToLocFormat |
formatVersion()
Get the format version that will be used when the loca table is
generated.
|
int |
glyphLength(int glyphId)
Get the length of the data in the glyph table for the specified glyph id.
|
int |
glyphOffset(int glyphId)
Return the offset for the given glyph id.
|
int |
loca(int index)
Get the value from the loca table for the index specified.
|
java.util.List<java.lang.Integer> |
locaList()
Gets the List of locas for loca table builder.
|
int |
numGlyphs()
Get the number of glyphs that this builder has support for.
|
int |
numLocas()
Get the number of locations or locas.
|
void |
revert()
Revert the loca table builder to the state contained in the last raw data
set on the builder.
|
void |
setFormatVersion(FontHeaderTable.IndexToLocFormat formatVersion)
Set the format version to be used when generating the loca table.
|
void |
setLocaList(java.util.List<java.lang.Integer> list)
Set the list of locas to be used for building this table.
|
void |
setNumGlyphs(int numGlyphs)
Set the number of glyphs.
|
getBuilder, header, toString
build, changed, data, readyToBuild, setData, setData
public static LocaTable.Builder createBuilder(Header header, WritableFontData data)
header
- the header informationdata
- the data holding the tablepublic FontHeaderTable.IndexToLocFormat formatVersion()
public void setFormatVersion(FontHeaderTable.IndexToLocFormat formatVersion)
formatVersion
- public java.util.List<java.lang.Integer> locaList()
setLocaList(List)
method.
If there is no current data for the loca table builder or the loca list
have not been previously set then this will return an empty List.setLocaList(List)
public void setLocaList(java.util.List<java.lang.Integer> list)
locaList()
method then the
connection of that previous list to this builder will be broken.list
- locaList()
public int glyphOffset(int glyphId)
glyphId
- the glyph id to get the offset for; must be less than or
equal to one more than the number of glyph idspublic int glyphLength(int glyphId)
glyphId
- the glyph id to get the offset for; must be less than or
equal to the number of glyphspublic void setNumGlyphs(int numGlyphs)
numGlyphs
- the number of glyphs represented by the datapublic int numGlyphs()
public void revert()
public int numLocas()
public int loca(int index)
index
- the loca table index