class HexaPDF::Font::TrueType::Table::Loca
The 'loca' (location) table contains the offsets of the glyphs relative to the start of the 'glyf' table.
See: developer.apple.com/fonts/TrueType-Reference-Manual/RM06/Chap6loca.html
Attributes
offsets[RW]
The array containing the byte offsets for each glyph relative to the start of the 'glyf' table.
Public Instance Methods
length(glyph_id)
click to toggle source
Returns the length of the 'glyf' entry for the given glyph ID.
# File lib/hexapdf/font/true_type/table/loca.rb, line 60 def length(glyph_id) @offsets[glyph_id + 1] - @offsets[glyph_id] end
offset(glyph_id)
click to toggle source
Returns the byte offset for the given glyph ID relative to the start of the 'glyf' table.
# File lib/hexapdf/font/true_type/table/loca.rb, line 55 def offset(glyph_id) @offsets[glyph_id] end