class TTFunk::Table::Cff
Constants
- TAG
Attributes
global_subr_index[R]
header[R]
name_index[R]
string_index[R]
top_index[R]
Public Instance Methods
encode(new_to_old, old_to_new)
click to toggle source
# File lib/ttfunk/table/cff.rb, line 34 def encode(new_to_old, old_to_new) EncodedString.new do |result| sub_tables = [ header.encode, name_index.encode, top_index.encode(&:encode), string_index.encode, global_subr_index.encode ] sub_tables.each { |tb| result << tb } top_index[0].finalize(result, new_to_old, old_to_new) end end
tag()
click to toggle source
# File lib/ttfunk/table/cff.rb, line 30 def tag TAG end
Private Instance Methods
parse!()
click to toggle source
# File lib/ttfunk/table/cff.rb, line 51 def parse! @header = Header.new(file, offset) @name_index = Index.new(file, @header.table_offset + @header.length) @top_index = TopIndex.new( file, @name_index.table_offset + @name_index.length ) @string_index = OneBasedIndex.new( file, @top_index.table_offset + @top_index.length ) @global_subr_index = SubrIndex.new( file, @string_index.table_offset + @string_index.length ) end