class TTFunk::Table::Cff::Encoding
def code_for(glyph_id)
def code_for(glyph_id) return 0 if glyph_id.zero? # rather than validating the glyph as part of one of the predefined # encodings, just pass it through return glyph_id unless offset case format_sym when :array_format, :supplemental @entries[glyph_id] when :range_format remaining = glyph_id @entries.each do |range| if range.size >= remaining return (range.first + remaining) - 1 end remaining -= range.size end 0 end end