module HexaPDF::Font::TrueType::Table::CmapSubtable::Format0

def self.parse(io, length)

It is assumed that the first six bytes of the subtable have already been consumed.

returns the contained code map.
Parses the format 0 cmap subtable from the given IO at the current position and

Format0.parse(io, length) -> code_map
:call-seq:
def self.parse(io, length)
  raise HexaPDF::Error, "Invalid length #{length} for cmap format 0" if length != 262
  code_map = io.read(256).unpack('C*')
  gid_map = {}
  code_map.each_with_index {|glyph, index| gid_map[glyph] = index }
  [code_map, gid_map]
end