class TTFunk::Table::Cff::FontIndex

CFF Font Dict Index.

Attributes

top_dict[R]

Top dict. @return [TTFunk::Table::Cff::TopDict]

Public Class Methods

new(top_dict, file, offset, length = nil) click to toggle source

@param top_dict [TTFunk::Table:Cff::TopDict] @param file [TTFunk::File] @param offset [Integer] @param length [Integer]

Calls superclass method TTFunk::SubTable::new
# File lib/ttfunk/table/cff/font_index.rb, line 16
def initialize(top_dict, file, offset, length = nil)
  super(file, offset, length)
  @top_dict = top_dict
end

Public Instance Methods

finalize(new_cff_data) click to toggle source

Finalize index.

@param new_cff_data [TTFunk::EncodedString] @return [void]

# File lib/ttfunk/table/cff/font_index.rb, line 25
def finalize(new_cff_data)
  each { |font_dict| font_dict.finalize(new_cff_data) }
end

Private Instance Methods

decode_item(_index, offset, length) click to toggle source
# File lib/ttfunk/table/cff/font_index.rb, line 31
def decode_item(_index, offset, length)
  TTFunk::Table::Cff::FontDict.new(top_dict, file, offset, length)
end
encode_items(*) click to toggle source
# File lib/ttfunk/table/cff/font_index.rb, line 35
def encode_items(*)
  # Re-encode font dicts
  map(&:encode)
end