类 IndexSubTable.Builder<T extends IndexSubTable>
java.lang.Object
com.google.typography.font.sfntly.table.FontDataTable.Builder<T>
com.google.typography.font.sfntly.table.SubTable.Builder<T>
com.google.typography.font.sfntly.table.bitmap.IndexSubTable.Builder<T>
- 直接已知子类:
IndexSubTableFormat1.Builder
,IndexSubTableFormat2.Builder
,IndexSubTableFormat3.Builder
,IndexSubTableFormat4.Builder
,IndexSubTableFormat5.Builder
- 封闭类:
IndexSubTable
public abstract static class IndexSubTable.Builder<T extends IndexSubTable>
extends SubTable.Builder<T>
-
字段概要
字段修饰符和类型字段说明private int
private int
private int
private int
private int
-
构造器概要
构造器限定符构造器说明protected
Builder
(int dataSize, int indexFormat) protected
Builder
(int indexFormat, int imageFormat, int imageDataOffset, int dataSize) protected
Builder
(ReadableFontData data, int firstGlyphIndex, int lastGlyphIndex) protected
Builder
(WritableFontData data, int firstGlyphIndex, int lastGlyphIndex) -
方法概要
修饰符和类型方法说明protected int
checkGlyphRange
(int glyphId) Checks that the glyph id is within the correct range.static IndexSubTable.Builder<? extends IndexSubTable>
createBuilder
(int indexFormat) (专用程序包) static IndexSubTable.Builder<? extends IndexSubTable>
createBuilder
(ReadableFontData data, int offsetToIndexSubTableArray, int arrayIndex) int
glyphInfo
(int glyphId) Gets the glyph info for the specified glyph id.abstract int
glyphLength
(int glyphId) Gets the length of the glyph within the EBDT table.final int
glyphOffset
(int glyphId) Gets the full offset of the glyph within the EBDT table.abstract int
glyphStartOffset
(int glyphId) Gets the offset of the glyph relative to the block for this index subtable.int
int
int
private void
initialize
(ReadableFontData data) (专用程序包) abstract Iterator<BitmapGlyphInfo>
iterator()
int
abstract int
protected void
revert()
Unable to fully revert unless some changes happen to hold the original data.protected int
void
setFirstGlyphIndex
(int firstGlyphIndex) void
setImageDataOffset
(int offset) void
setImageFormat
(int imageFormat) void
setLastGlyphIndex
(int lastGlyphIndex) protected T
Build a table with the data provided.protected void
Tell the subclass that the data has been changed and any structures must be discarded.protected int
Query if the subclass needs to serialize and how much data is required.protected boolean
protected int
subSerialize
(WritableFontData newData) Serialize the table to the data provided.toString()
从类继承的方法 com.google.typography.font.sfntly.table.SubTable.Builder
masterReadData
从类继承的方法 com.google.typography.font.sfntly.table.FontDataTable.Builder
build, changed, containedModelChanged, currentModelChanged, data, dataChanged, internalReadData, internalWriteData, modelChanged, notifyPostTableBuild, readyToBuild, setData, setData, setModelChanged, setModelChanged
-
字段详细资料
-
firstGlyphIndex
private int firstGlyphIndex -
lastGlyphIndex
private int lastGlyphIndex -
indexFormat
private int indexFormat -
imageFormat
private int imageFormat -
imageDataOffset
private int imageDataOffset
-
-
构造器详细资料
-
Builder
protected Builder(int dataSize, int indexFormat) -
Builder
protected Builder(int indexFormat, int imageFormat, int imageDataOffset, int dataSize) -
Builder
-
Builder
-
-
方法详细资料
-
createBuilder
-
createBuilder
static IndexSubTable.Builder<? extends IndexSubTable> createBuilder(ReadableFontData data, int offsetToIndexSubTableArray, int arrayIndex) -
initialize
- 参数:
data
-
-
revert
protected void revert()Unable to fully revert unless some changes happen to hold the original data. Until then keep as protected. -
indexFormat
public int indexFormat() -
firstGlyphIndex
public int firstGlyphIndex() -
setFirstGlyphIndex
public void setFirstGlyphIndex(int firstGlyphIndex) -
lastGlyphIndex
public int lastGlyphIndex() -
setLastGlyphIndex
public void setLastGlyphIndex(int lastGlyphIndex) -
imageFormat
public int imageFormat() -
setImageFormat
public void setImageFormat(int imageFormat) -
imageDataOffset
public int imageDataOffset() -
setImageDataOffset
public void setImageDataOffset(int offset) -
numGlyphs
public abstract int numGlyphs() -
glyphInfo
Gets the glyph info for the specified glyph id.- 参数:
glyphId
- the glyph id to look up- 返回:
- the glyph info
-
glyphOffset
public final int glyphOffset(int glyphId) Gets the full offset of the glyph within the EBDT table.- 参数:
glyphId
- the glyph id- 返回:
- the glyph offset
-
glyphStartOffset
public abstract int glyphStartOffset(int glyphId) Gets the offset of the glyph relative to the block for this index subtable.- 参数:
glyphId
- the glyph id- 返回:
- the glyph offset
-
glyphLength
public abstract int glyphLength(int glyphId) Gets the length of the glyph within the EBDT table.- 参数:
glyphId
- the glyph id- 返回:
- the glyph offset
-
checkGlyphRange
protected int checkGlyphRange(int glyphId) Checks that the glyph id is within the correct range. If it returns the offset of the glyph id from the start of the range.- 参数:
glyphId
-- 返回:
- the offset of the glyphId from the start of the glyph range
- 抛出:
IndexOutOfBoundsException
- if the glyph id is not within the correct range
-
serializeIndexSubHeader
-
iterator
-
subBuildTable
从类复制的说明:FontDataTable.Builder
Build a table with the data provided.- 指定者:
subBuildTable
在类中FontDataTable.Builder<T extends IndexSubTable>
- 参数:
data
- the data to use to build the table- 返回:
- a table
-
subDataSet
protected void subDataSet()从类复制的说明:FontDataTable.Builder
Tell the subclass that the data has been changed and any structures must be discarded.- 指定者:
subDataSet
在类中FontDataTable.Builder<T extends IndexSubTable>
-
subDataSizeToSerialize
protected int subDataSizeToSerialize()从类复制的说明:FontDataTable.Builder
Query if the subclass needs to serialize and how much data is required.- 指定者:
subDataSizeToSerialize
在类中FontDataTable.Builder<T extends IndexSubTable>
- 返回:
- positive bytes needed to serialize if a fixed size; and zero or negative bytes as an estimate if growable data is needed
-
subReadyToSerialize
protected boolean subReadyToSerialize()- 指定者:
subReadyToSerialize
在类中FontDataTable.Builder<T extends IndexSubTable>
- 返回:
- true if the subclass is ready to serialize it's structure into data
-
subSerialize
从类复制的说明:FontDataTable.Builder
Serialize the table to the data provided.- 指定者:
subSerialize
在类中FontDataTable.Builder<T extends IndexSubTable>
- 参数:
newData
- the data object to serialize to- 返回:
- the number of bytes written
-
toString
-