Class: TTFunk::Table::Cff::FontIndex

Inherits:
Index show all
Defined in:
lib/ttfunk/table/cff/font_index.rb

Overview

CFF Font Dict Index.

Instance Attribute Summary collapse

Attributes inherited from SubTable

#file, #length, #table_offset

Instance Method Summary collapse

Methods inherited from Index

#[], #each, #encode, #items_count

Methods inherited from SubTable

#eot?, #read

Constructor Details

#initialize(top_dict, file, offset, length = nil) ⇒ FontIndex

Returns a new instance of FontIndex.

Parameters:

  • top_dict (TTFunk::Table:Cff::TopDict)
  • file (TTFunk::File)
  • offset (Integer)
  • length (Integer) (defaults to: nil)


16
17
18
19
# 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

Instance Attribute Details

#top_dictTTFunk::Table::Cff::TopDict (readonly)

Top dict.



10
11
12
# File 'lib/ttfunk/table/cff/font_index.rb', line 10

def top_dict
  @top_dict
end

Instance Method Details

#finalize(new_cff_data) ⇒ void

This method returns an undefined value.

Finalize index.

Parameters:



25
26
27
# 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