Class: TTFunk::Table::Hhea

Inherits:
TTFunk::Table show all
Defined in:
lib/ttfunk/table/hhea.rb

Instance Attribute Summary collapse

Attributes inherited from TTFunk::Table

#file, #length, #offset

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_maxObject (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

#ascentObject (readonly)

Returns the value of attribute ascent.



7
8
9
# File 'lib/ttfunk/table/hhea.rb', line 7

def ascent
  @ascent
end

#carot_slope_riseObject (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_runObject (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

#descentObject (readonly)

Returns the value of attribute descent.



8
9
10
# File 'lib/ttfunk/table/hhea.rb', line 8

def descent
  @descent
end

#line_gapObject (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_formatObject (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_bearingObject (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_bearingObject (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_metricsObject (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

#versionObject (readonly)

Returns the value of attribute version.



6
7
8
# File 'lib/ttfunk/table/hhea.rb', line 6

def version
  @version
end

#x_max_extentObject (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