class Tipo::Font
Public Class Methods
new(file)
click to toggle source
# File lib/tipo/font.rb, line 9 def initialize file @file = File.open file, 'rb:ASCII-8BIT' end
Public Instance Methods
chunk(options)
click to toggle source
# File lib/tipo/font.rb, line 17 def chunk options @file.seek options[:seek] if options[:seek] @file.read options.fetch :bytes end
encoding()
click to toggle source
# File lib/tipo/font.rb, line 13 def encoding @file.read(5).encoding end
unpack(options)
click to toggle source
# File lib/tipo/font.rb, line 22 def unpack options tmpl = options.delete :tmpl chunk(options).unpack tmpl end