类 Header
java.lang.Object
com.google.typography.font.sfntly.table.Header
The header entry for a table in the OffsetTable for the font.
For equality purposes the only property of the header that is considered is
the tag - the name of the table that is referred to by this header. There can
only be one table with each tag in the font and it doesn't matter what the
other properties of that header are for that purpose.
- 作者:
- Stuart Gill
-
字段概要
字段修饰符和类型字段说明private final long
private final boolean
static final Comparator<Header>
static final Comparator<Header>
private final int
private final boolean
private final int
private final boolean
private final int
-
构造器概要
构造器 -
方法概要
修饰符和类型方法说明long
checksum()
Get the checksum for the table as recorded in the table record header.boolean
Is the checksum valid.boolean
Checks equality of this Header against another object.int
hashCode()
Computes the hashcode for this Header .int
length()
Get the length of the table as recorded in the table record header.boolean
Is the length in the header valid.int
offset()
Get the table offset.boolean
Is the offset in the header valid.int
tag()
Get the table tag.toString()
-
字段详细资料
-
tag
private final int tag -
offset
private final int offset -
offsetValid
private final boolean offsetValid -
length
private final int length -
lengthValid
private final boolean lengthValid -
checksum
private final long checksum -
checksumValid
private final boolean checksumValid -
COMPARATOR_BY_OFFSET
-
COMPARATOR_BY_TAG
-
-
构造器详细资料
-
Header
public Header(int tag, long checksum, int offset, int length) Constructor. Make a full header as read from an existing font.- 参数:
tag
-checksum
-offset
-length
-
-
Header
public Header(int tag, int length) Constructor. Make a partial header with only the basic info for a new table.- 参数:
tag
-length
-
-
Header
public Header(int tag) Constructor. Make a partial header with only the basic info for an empty new table.- 参数:
tag
-
-
-
方法详细资料
-
tag
public int tag()Get the table tag.- 返回:
- the tag
-
offset
public int offset()Get the table offset. The offset is from the start of the font file. This offset value is what was read from the font file during construction of the font. It may not be meaningful if the font was maninpulated through the builders.- 返回:
- the offset
-
offsetValid
public boolean offsetValid()Is the offset in the header valid. The offset will not be valid if the table was constructed during building and has no physical location in a font file.- 返回:
- true if the offset is valid; false otherwise
-
length
public int length()Get the length of the table as recorded in the table record header. During building the header length will reflect the length that was initially read from the font file. This may not be consistent with the current state of the data.- 返回:
- the length
-
lengthValid
public boolean lengthValid()Is the length in the header valid. The length will not be valid if the table was constructed during building and has no physical location in a font file until the table is built from the builder.- 返回:
- true if the offset is valid; false otherwise
-
checksum
public long checksum()Get the checksum for the table as recorded in the table record header.- 返回:
- the checksum
-
checksumValid
public boolean checksumValid()Is the checksum valid. The checksum will not be valid if the table was constructed during building and has no physical location in a font file. Note that this does not check the validity of the checksum against the calculated checksum for the table data.- 返回:
- true if the checksum is valid; false otherwise
-
equals
Checks equality of this Header against another object. The only property of the Header object that is considered is the tag. -
hashCode
public int hashCode()Computes the hashcode for this Header . The only property of the Header object that is considered is the tag. -
toString
-