类 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 intprivate intprivate intprivate intprivate int -
构造器概要
构造器限定符构造器说明protectedBuilder(int dataSize, int indexFormat) protectedBuilder(int indexFormat, int imageFormat, int imageDataOffset, int dataSize) protectedBuilder(ReadableFontData data, int firstGlyphIndex, int lastGlyphIndex) protectedBuilder(WritableFontData data, int firstGlyphIndex, int lastGlyphIndex) -
方法概要
修饰符和类型方法说明protected intcheckGlyphRange(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) intglyphInfo(int glyphId) Gets the glyph info for the specified glyph id.abstract intglyphLength(int glyphId) Gets the length of the glyph within the EBDT table.final intglyphOffset(int glyphId) Gets the full offset of the glyph within the EBDT table.abstract intglyphStartOffset(int glyphId) Gets the offset of the glyph relative to the block for this index subtable.intintintprivate voidinitialize(ReadableFontData data) (专用程序包) abstract Iterator<BitmapGlyphInfo>iterator()intabstract intprotected voidrevert()Unable to fully revert unless some changes happen to hold the original data.protected intvoidsetFirstGlyphIndex(int firstGlyphIndex) voidsetImageDataOffset(int offset) voidsetImageFormat(int imageFormat) voidsetLastGlyphIndex(int lastGlyphIndex) protected TBuild a table with the data provided.protected voidTell the subclass that the data has been changed and any structures must be discarded.protected intQuery if the subclass needs to serialize and how much data is required.protected booleanprotected intsubSerialize(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.BuilderBuild 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.BuilderTell 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.BuilderQuery 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.BuilderSerialize 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
-