Class: HexaPDF::Font::TrueType::Table::Directory

Inherits:
HexaPDF::Font::TrueType::Table show all
Defined in:
lib/hexapdf/font/true_type/table/directory.rb

Overview

The main table of an sfnt-housed font file, providing the table directory which contains information for loading all other tables.

See: developer.apple.com/fonts/TrueType-Reference-Manual/RM06/Chap6.html

Defined Under Namespace

Classes: Entry

Constant Summary collapse

SELF_ENTRY =

The fixed entry that represents the table directory itself.

Entry.new('DUMMY', 0, 0, 12)

Constants inherited from HexaPDF::Font::TrueType::Table

TIME_EPOCH

Instance Attribute Summary collapse

Attributes inherited from HexaPDF::Font::TrueType::Table

#font

Instance Method Summary collapse

Methods inherited from HexaPDF::Font::TrueType::Table

calculate_checksum, #checksum_valid?, #directory_entry, #initialize, #raw_data

Constructor Details

This class inherits a constructor from HexaPDF::Font::TrueType::Table

Instance Attribute Details

#tagObject (readonly)

The type of file housed by the snft wrapper as a binary string. Two possible values are ‘true’ or 0x00010000 for a TrueType font and ‘OTTO’ for an OpenType font.



65
66
67
# File 'lib/hexapdf/font/true_type/table/directory.rb', line 65

def tag
  @tag
end

Instance Method Details

#entry(tag) ⇒ Object

Returns the directory entry for the given tag or nil if no such table exists.



68
69
70
# File 'lib/hexapdf/font/true_type/table/directory.rb', line 68

def entry(tag)
  @tables[tag]
end