module HexaPDF::Font::TrueType::Table::Post::Format2
'post' table format 2
Public Class Methods
parse(io, length) → glyph_names
click to toggle source
Parses the format 2 post subtable from the given IO at the current position and returns the contained glyph name map.
# File lib/hexapdf/font/true_type/table/post.rb, line 168 def self.parse(io, length) end_pos = io.pos + length num_glyphs = io.read(2).unpack1('n') glyph_name_index = io.read(2 * num_glyphs).unpack('n*') names = [] names << io.read(io.getbyte).force_encoding(::Encoding::UTF_8) while io.pos < end_pos mapper(glyph_name_index, names) end