Class: TTFunk::Table::Head
- Inherits:
-
TTFunk::Table
- Object
- TTFunk::Table
- TTFunk::Table::Head
- Defined in:
- lib/ttfunk/table/head.rb
Instance Attribute Summary collapse
-
#checksum_adjustment ⇒ Object
readonly
Returns the value of attribute checksum_adjustment.
-
#created ⇒ Object
readonly
Returns the value of attribute created.
-
#flags ⇒ Object
readonly
Returns the value of attribute flags.
-
#font_direction_hint ⇒ Object
readonly
Returns the value of attribute font_direction_hint.
-
#font_revision ⇒ Object
readonly
Returns the value of attribute font_revision.
-
#glyph_data_format ⇒ Object
readonly
Returns the value of attribute glyph_data_format.
-
#index_to_loc_format ⇒ Object
readonly
Returns the value of attribute index_to_loc_format.
-
#lowest_rec_ppem ⇒ Object
readonly
Returns the value of attribute lowest_rec_ppem.
-
#mac_style ⇒ Object
readonly
Returns the value of attribute mac_style.
-
#magic_number ⇒ Object
readonly
Returns the value of attribute magic_number.
-
#modified ⇒ Object
readonly
Returns the value of attribute modified.
-
#units_per_em ⇒ Object
readonly
Returns the value of attribute units_per_em.
-
#version ⇒ Object
readonly
Returns the value of attribute version.
-
#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.
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
#checksum_adjustment ⇒ Object (readonly)
Returns the value of attribute checksum_adjustment.
8 9 10 |
# File 'lib/ttfunk/table/head.rb', line 8 def checksum_adjustment @checksum_adjustment end |
#created ⇒ Object (readonly)
Returns the value of attribute created.
12 13 14 |
# File 'lib/ttfunk/table/head.rb', line 12 def created @created end |
#flags ⇒ Object (readonly)
Returns the value of attribute flags.
10 11 12 |
# File 'lib/ttfunk/table/head.rb', line 10 def flags @flags end |
#font_direction_hint ⇒ Object (readonly)
Returns the value of attribute font_direction_hint.
20 21 22 |
# File 'lib/ttfunk/table/head.rb', line 20 def font_direction_hint @font_direction_hint end |
#font_revision ⇒ Object (readonly)
Returns the value of attribute font_revision.
7 8 9 |
# File 'lib/ttfunk/table/head.rb', line 7 def font_revision @font_revision end |
#glyph_data_format ⇒ Object (readonly)
Returns the value of attribute glyph_data_format.
22 23 24 |
# File 'lib/ttfunk/table/head.rb', line 22 def glyph_data_format @glyph_data_format end |
#index_to_loc_format ⇒ Object (readonly)
Returns the value of attribute index_to_loc_format.
21 22 23 |
# File 'lib/ttfunk/table/head.rb', line 21 def index_to_loc_format @index_to_loc_format end |
#lowest_rec_ppem ⇒ Object (readonly)
Returns the value of attribute lowest_rec_ppem.
19 20 21 |
# File 'lib/ttfunk/table/head.rb', line 19 def lowest_rec_ppem @lowest_rec_ppem end |
#mac_style ⇒ Object (readonly)
Returns the value of attribute mac_style.
18 19 20 |
# File 'lib/ttfunk/table/head.rb', line 18 def mac_style @mac_style end |
#magic_number ⇒ Object (readonly)
Returns the value of attribute magic_number.
9 10 11 |
# File 'lib/ttfunk/table/head.rb', line 9 def magic_number @magic_number end |
#modified ⇒ Object (readonly)
Returns the value of attribute modified.
13 14 15 |
# File 'lib/ttfunk/table/head.rb', line 13 def modified @modified end |
#units_per_em ⇒ Object (readonly)
Returns the value of attribute units_per_em.
11 12 13 |
# File 'lib/ttfunk/table/head.rb', line 11 def units_per_em @units_per_em end |
#version ⇒ Object (readonly)
Returns the value of attribute version.
6 7 8 |
# File 'lib/ttfunk/table/head.rb', line 6 def version @version end |
#x_max ⇒ Object (readonly)
Returns the value of attribute x_max.
16 17 18 |
# File 'lib/ttfunk/table/head.rb', line 16 def x_max @x_max end |
#x_min ⇒ Object (readonly)
Returns the value of attribute x_min.
14 15 16 |
# File 'lib/ttfunk/table/head.rb', line 14 def x_min @x_min end |
#y_max ⇒ Object (readonly)
Returns the value of attribute y_max.
17 18 19 |
# File 'lib/ttfunk/table/head.rb', line 17 def y_max @y_max end |
#y_min ⇒ Object (readonly)
Returns the value of attribute y_min.
15 16 17 |
# File 'lib/ttfunk/table/head.rb', line 15 def y_min @y_min end |
Class Method Details
.encode(head, loca) ⇒ Object
24 25 26 27 28 29 |
# File 'lib/ttfunk/table/head.rb', line 24 def self.encode(head, loca) table = head.raw table[8,4] = "\0\0\0\0" # set checksum adjustment to 0 initially table[-4,2] = [loca[:type]].pack("n") # set index_to_loc_format return table end |