class TTFunk::Table::Glyf::Simple
Attributes
Public Class Methods
Source
# File lib/ttfunk/table/glyf/simple.rb, line 15 def initialize(id, raw) @id = id @raw = raw io = StringIO.new(raw) @number_of_contours, @x_min, @y_min, @x_max, @y_max = io.read(10).unpack('n*').map do |i| BinUtils.twos_comp_to_int(i, bit_width: 16) end @end_points_of_contours = io.read(number_of_contours * 2).unpack('n*') @instruction_length = io.read(2).unpack1('n') @instructions = io.read(instruction_length).unpack('C*') end
Public Instance Methods
Source
# File lib/ttfunk/table/glyf/simple.rb, line 38 def end_point_of_last_contour end_points_of_contours.last + 1 end
Source
# File lib/ttfunk/table/glyf/simple.rb, line 34 def recode(_mapping) raw end