Class: TTFunk::Table::Glyf::Simple
- Inherits:
-
Object
- Object
- TTFunk::Table::Glyf::Simple
- Defined in:
- lib/ttfunk/table/glyf/simple.rb
Instance Attribute Summary collapse
-
#number_of_contours ⇒ Object
readonly
Returns the value of attribute number_of_contours.
-
#raw ⇒ Object
readonly
Returns the value of attribute raw.
-
#x_max ⇒ Object
readonly
Returns the value of attribute x_max.
-
#x_min ⇒ Object
readonly
Returns the value of attribute x_min.
-
#y_max ⇒ Object
readonly
Returns the value of attribute y_max.
-
#y_min ⇒ Object
readonly
Returns the value of attribute y_min.
Instance Method Summary collapse
- #compound? ⇒ Boolean
-
#initialize(raw, number_of_contours, x_min, y_min, x_max, y_max) ⇒ Simple
constructor
A new instance of Simple.
- #recode(mapping) ⇒ Object
Constructor Details
#initialize(raw, number_of_contours, x_min, y_min, x_max, y_max) ⇒ Simple
Returns a new instance of Simple.
11 12 13 14 15 16 17 18 19 20 21 22 23 24 |
# File 'lib/ttfunk/table/glyf/simple.rb', line 11 def initialize(raw, number_of_contours, x_min, y_min, x_max, y_max) @raw = raw @number_of_contours = number_of_contours @x_min, @y_min = x_min, y_min @x_max, @y_max = x_max, y_max # Because TTFunk is, at this time, a library for simply pulling # metrics out of font files, or for writing font subsets, we don't # really care what the contours are for simple glyphs. We just # care that we've got an entire glyph's definition. Also, a # bounding box could be nice to know. Since we've got all that # at this point, we don't need to worry about parsing the full # contents of the glyph. end |
Instance Attribute Details
#number_of_contours ⇒ Object (readonly)
Returns the value of attribute number_of_contours.
8 9 10 |
# File 'lib/ttfunk/table/glyf/simple.rb', line 8 def number_of_contours @number_of_contours end |
#raw ⇒ Object (readonly)
Returns the value of attribute raw.
7 8 9 |
# File 'lib/ttfunk/table/glyf/simple.rb', line 7 def raw @raw end |
#x_max ⇒ Object (readonly)
Returns the value of attribute x_max.
9 10 11 |
# File 'lib/ttfunk/table/glyf/simple.rb', line 9 def x_max @x_max end |
#x_min ⇒ Object (readonly)
Returns the value of attribute x_min.
9 10 11 |
# File 'lib/ttfunk/table/glyf/simple.rb', line 9 def x_min @x_min end |
#y_max ⇒ Object (readonly)
Returns the value of attribute y_max.
9 10 11 |
# File 'lib/ttfunk/table/glyf/simple.rb', line 9 def y_max @y_max end |
#y_min ⇒ Object (readonly)
Returns the value of attribute y_min.
9 10 11 |
# File 'lib/ttfunk/table/glyf/simple.rb', line 9 def y_min @y_min end |
Instance Method Details
#compound? ⇒ Boolean
26 27 28 |
# File 'lib/ttfunk/table/glyf/simple.rb', line 26 def compound? false end |
#recode(mapping) ⇒ Object
30 31 32 |
# File 'lib/ttfunk/table/glyf/simple.rb', line 30 def recode(mapping) raw end |