java.lang.Object
com.google.typography.font.sfntly.table.Header

public final class Header extends Object
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
  • 字段详细资料

    • 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

      public static final Comparator<Header> COMPARATOR_BY_OFFSET
    • COMPARATOR_BY_TAG

      public static final Comparator<Header> 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

      public boolean equals(Object obj)
      Checks equality of this Header against another object. The only property of the Header object that is considered is the tag.
      覆盖:
      equals 在类中 Object
    • hashCode

      public int hashCode()
      Computes the hashcode for this Header . The only property of the Header object that is considered is the tag.
      覆盖:
      hashCode 在类中 Object
    • toString

      public String toString()
      覆盖:
      toString 在类中 Object