class TTFunk::Table::Glyf::Simple
Attributes
end_points_of_contours[R]
id[R]
instruction_length[R]
instructions[R]
number_of_contours[R]
raw[R]
x_max[R]
x_min[R]
y_max[R]
y_min[R]
Public Class Methods
new(id, raw)
click to toggle 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
compound?()
click to toggle source
# File lib/ttfunk/table/glyf/simple.rb, line 30 def compound? false end
end_point_of_last_contour()
click to toggle source
# File lib/ttfunk/table/glyf/simple.rb, line 38 def end_point_of_last_contour end_points_of_contours.last + 1 end
recode(_mapping)
click to toggle source
# File lib/ttfunk/table/glyf/simple.rb, line 34 def recode(_mapping) raw end