class TTFunk::Table
SFNT table
Attributes
This table’s length in byes. @return [Integer, nil]
This table’s offset from the file beginning. @return [Integer]
Public Class Methods
Source
# File lib/ttfunk/table.rb, line 23 def initialize(file) @file = file @offset = nil @length = nil info = file.directory_info(tag) if info @offset = info[:offset] @length = info[:length] parse_from(@offset) { parse! } end end
@param file [TTFunk::File]
Public Instance Methods
Source
# File lib/ttfunk/table.rb, line 41 def exists? !@offset.nil? end
Does this table exist in the file?
@return [Boolean]
Source
# File lib/ttfunk/table.rb, line 48 def raw if exists? parse_from(offset) { io.read(length) } end end
Raw bytes of this table in the file.
@return [String, nil]