module TTFunk::Table::Post::Format40
Version 4.0 names glyphs by their character code.
Public Instance Methods
glyph_for(code)
click to toggle source
Get glyph name for character code.
@param code [Integer] @return [String]
# File lib/ttfunk/table/post/format40.rb, line 12 def glyph_for(code) @map[code] || 0xFFFF end
Private Instance Methods
parse_format!()
click to toggle source
# File lib/ttfunk/table/post/format40.rb, line 18 def parse_format! @map = read(file.maximum_profile.num_glyphs * 2, 'N*') end