Class: TTFunk::Table::Hhea
- Inherits:
-
TTFunk::Table
- Object
- TTFunk::Table
- TTFunk::Table::Hhea
- Defined in:
- lib/ttfunk/table/hhea.rb
Instance Attribute Summary collapse
-
#advance_width_max ⇒ Object
readonly
Returns the value of attribute advance_width_max.
-
#ascent ⇒ Object
readonly
Returns the value of attribute ascent.
-
#carot_slope_rise ⇒ Object
readonly
Returns the value of attribute carot_slope_rise.
-
#carot_slope_run ⇒ Object
readonly
Returns the value of attribute carot_slope_run.
-
#descent ⇒ Object
readonly
Returns the value of attribute descent.
-
#line_gap ⇒ Object
readonly
Returns the value of attribute line_gap.
-
#metric_data_format ⇒ Object
readonly
Returns the value of attribute metric_data_format.
-
#min_left_side_bearing ⇒ Object
readonly
Returns the value of attribute min_left_side_bearing.
-
#min_right_side_bearing ⇒ Object
readonly
Returns the value of attribute min_right_side_bearing.
-
#number_of_metrics ⇒ Object
readonly
Returns the value of attribute number_of_metrics.
-
#version ⇒ Object
readonly
Returns the value of attribute version.
-
#x_max_extent ⇒ Object
readonly
Returns the value of attribute x_max_extent.
Attributes inherited from TTFunk::Table
Class Method Summary collapse
Methods inherited from TTFunk::Table
#exists?, #initialize, #raw, #tag
Constructor Details
This class inherits a constructor from TTFunk::Table
Instance Attribute Details
#advance_width_max ⇒ Object (readonly)
Returns the value of attribute advance_width_max.
10 11 12 |
# File 'lib/ttfunk/table/hhea.rb', line 10 def advance_width_max @advance_width_max end |
#ascent ⇒ Object (readonly)
Returns the value of attribute ascent.
7 8 9 |
# File 'lib/ttfunk/table/hhea.rb', line 7 def ascent @ascent end |
#carot_slope_rise ⇒ Object (readonly)
Returns the value of attribute carot_slope_rise.
14 15 16 |
# File 'lib/ttfunk/table/hhea.rb', line 14 def carot_slope_rise @carot_slope_rise end |
#carot_slope_run ⇒ Object (readonly)
Returns the value of attribute carot_slope_run.
15 16 17 |
# File 'lib/ttfunk/table/hhea.rb', line 15 def carot_slope_run @carot_slope_run end |
#descent ⇒ Object (readonly)
Returns the value of attribute descent.
8 9 10 |
# File 'lib/ttfunk/table/hhea.rb', line 8 def descent @descent end |
#line_gap ⇒ Object (readonly)
Returns the value of attribute line_gap.
9 10 11 |
# File 'lib/ttfunk/table/hhea.rb', line 9 def line_gap @line_gap end |
#metric_data_format ⇒ Object (readonly)
Returns the value of attribute metric_data_format.
16 17 18 |
# File 'lib/ttfunk/table/hhea.rb', line 16 def metric_data_format @metric_data_format end |
#min_left_side_bearing ⇒ Object (readonly)
Returns the value of attribute min_left_side_bearing.
11 12 13 |
# File 'lib/ttfunk/table/hhea.rb', line 11 def min_left_side_bearing @min_left_side_bearing end |
#min_right_side_bearing ⇒ Object (readonly)
Returns the value of attribute min_right_side_bearing.
12 13 14 |
# File 'lib/ttfunk/table/hhea.rb', line 12 def min_right_side_bearing @min_right_side_bearing end |
#number_of_metrics ⇒ Object (readonly)
Returns the value of attribute number_of_metrics.
17 18 19 |
# File 'lib/ttfunk/table/hhea.rb', line 17 def number_of_metrics @number_of_metrics end |
#version ⇒ Object (readonly)
Returns the value of attribute version.
6 7 8 |
# File 'lib/ttfunk/table/hhea.rb', line 6 def version @version end |
#x_max_extent ⇒ Object (readonly)
Returns the value of attribute x_max_extent.
13 14 15 |
# File 'lib/ttfunk/table/hhea.rb', line 13 def x_max_extent @x_max_extent end |
Class Method Details
.encode(hhea, hmtx) ⇒ Object
19 20 21 22 23 |
# File 'lib/ttfunk/table/hhea.rb', line 19 def self.encode(hhea, hmtx) raw = hhea.raw raw[-2,2] = [hmtx[:number_of_metrics]].pack("n") return raw end |