class HexaPDF::Font::TrueType::Table::Name

See: developer.apple.com/fonts/TrueType-Reference-Manual/RM06/Chap6name.html<br><br>copyright notices and so on.
The ‘name’ table contains the human-readable names for features, font names, style names,

def [](name_or_id)

See: NAME_MAP

symbol or an ID).
Returns an array with all available entries for the given name identifier (either a
def [](name_or_id)
  @records[name_or_id.kind_of?(Symbol) ? NAME_MAP[name_or_id] : name_or_id]
end

def parse_table #:nodoc:

:nodoc:
def parse_table #:nodoc:
  @format, count, string_offset = read_formatted(6, 'n3')
  string_offset += directory_entry.offset
  @records = Hash.new {|h, k| h[k] = Records.new }
  @language_tags = {}
  record_rows = Array.new(count) { read_formatted(12, 'n6') }
  if @format == 1
    count = read_formatted(2, 'n').first
    language_rows = Array.new(count) { read_formatted(4, 'n2') }
  end
  record_rows.each do |pid, eid, lid, nid, length, offset|
    io.pos = string_offset + offset
    @records[nid] << Record.new(io.read(length), pid, eid, lid)
  end
  if @format == 1
    language_rows.each_with_index do |(length, offset), index|
      io.pos = string_offset + offset
      @language_tags[0x8000 + index] =
        io.read(length).encode!(::Encoding::UTF_8, ::Encoding::UTF_16BE)
    end
  end
end