Class: Fontisan::Binary::TableDirectoryEntry
- Inherits:
-
BaseRecord
- Object
- BinData::Record
- BaseRecord
- Fontisan::Binary::TableDirectoryEntry
- Defined in:
- lib/fontisan/binary/structures.rb
Overview
OpenType Table Directory Entry
Each entry describes one table in the font file.
Structure:
- char: tag (table identifier)
- uint32: checksum (checksum for this table)
- uint32: offset (byte offset from beginning of font file)
- uint32: table_length (length of table in bytes)
Instance Method Summary collapse
-
#tag?(other_tag) ⇒ Boolean
Check if this entry has a specific tag.
-
#tag_object ⇒ Parsers::Tag
Convert tag to Tag object for comparison.
Methods inherited from BaseRecord
Instance Method Details
#tag?(other_tag) ⇒ Boolean
Check if this entry has a specific tag
77 78 79 |
# File 'lib/fontisan/binary/structures.rb', line 77 def tag?(other_tag) tag_object == (other_tag.is_a?(Parsers::Tag) ? other_tag : Parsers::Tag.new(other_tag)) end |
#tag_object ⇒ Parsers::Tag
Convert tag to Tag object for comparison
69 70 71 |
# File 'lib/fontisan/binary/structures.rb', line 69 def tag_object Parsers::Tag.new(tag) end |