class TTFunk::Table
SFNT table
def exists?
-
(Boolean)
-
def exists? !@offset.nil? end
def initialize(file)
-
file
(TTFunk::File
) --
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
def parse!
def parse! # do nothing, by default end
def raw
-
(String, nil)
-
def raw if exists? parse_from(offset) { io.read(length) } end end
def tag
-
(String)
-
def tag self.class.name.split('::').last.downcase end