class Tipo::Table::Substitution

Constants

FeatureRecord

full template 'a4n'

full template 'n5'

Public Class Methods

new(header, font) click to toggle source
Calls superclass method Tipo::Table::Base::new
# File lib/tipo/table/substitution.rb, line 16
def initialize header, font
  @name = "GSUB"
  super
end

Public Instance Methods

feature_list() click to toggle source
# File lib/tipo/table/substitution.rb, line 33
def feature_list
  feature_list_count.times.map do
    FeatureRecord.new *(font.unpack bytes: 6, tmpl: 'a4n')
  end
end
feature_list_count() click to toggle source
# File lib/tipo/table/substitution.rb, line 29
def feature_list_count
  font.unpack(seek: feature_list_offset, bytes: 2, tmpl: 'n').first 
end
feature_list_offset() click to toggle source
# File lib/tipo/table/substitution.rb, line 25
def feature_list_offset
  header.feature_offset + offset
end
header() click to toggle source
# File lib/tipo/table/substitution.rb, line 21
def header
  Header.new *(font.unpack seek: offset, bytes: 10, tmpl: 'n5')
end