class TTFunk::SubTable
Attributes
Public Class Methods
Source
# File lib/ttfunk/sub_table.rb, line 14 def initialize(file, offset, length = nil) @file = file @table_offset = offset @length = length parse_from(@table_offset) { parse! } end
Public Instance Methods
Source
# File lib/ttfunk/sub_table.rb, line 22 def eot? # if length isn't set yet there's no way to know if we're at the end of # the table or not return false unless length io.pos > table_offset + length end
end of table
Source
# File lib/ttfunk/sub_table.rb, line 30 def read(*args) if eot? raise EOTError, 'attempted to read past the end of the table' end super end
Calls superclass method
TTFunk::Reader#read