class TTFunk::Table::Cff::CharstringsIndex
Attributes
Public Class Methods
Source
# File lib/ttfunk/table/cff/charstrings_index.rb, line 9 def initialize(top_dict, *remaining_args) super(*remaining_args) @top_dict = top_dict end
Calls superclass method
TTFunk::SubTable::new
Public Instance Methods
Source
# File lib/ttfunk/table/cff/charstrings_index.rb, line 14 def [](index) entry_cache[index] ||= TTFunk::Table::Cff::Charstring.new( index, top_dict, font_dict_for(index), super ) end
Calls superclass method
TTFunk::Table::Cff::Index#[]
Source
# File lib/ttfunk/table/cff/charstrings_index.rb, line 21 def encode(mapping) super() do |_entry, index| self[mapping[index]].encode if mapping.include?(index) end end
gets passed a mapping of new => old glyph ids
Calls superclass method
TTFunk::Table::Cff::Index#encode
Private Instance Methods
Source
# File lib/ttfunk/table/cff/charstrings_index.rb, line 29 def font_dict_for(index) # only CID-keyed fonts contain an FD selector and font dicts if top_dict.is_cid_font? fd_index = top_dict.font_dict_selector[index] top_dict.font_index[fd_index] end end