Class: TTFunk::Table::Cff::Header
- Defined in:
- lib/ttfunk/table/cff/header.rb
Overview
CFF Header.
Instance Attribute Summary collapse
-
#absolute_offset_size ⇒ Integer
readonly
Size of all offsets from beginning of table.
-
#header_size ⇒ Integer
readonly
Size of the header itself.
-
#major ⇒ Integer
readonly
CFF table major version.
-
#minor ⇒ Integer
readonly
CFF table minor version.
Attributes inherited from SubTable
Instance Method Summary collapse
-
#encode ⇒ String
Encode header.
-
#length ⇒ Integer
Length of header.
Methods inherited from SubTable
Constructor Details
This class inherits a constructor from TTFunk::SubTable
Instance Attribute Details
#absolute_offset_size ⇒ Integer (readonly)
Size of all offsets from beginning of table.
22 23 24 |
# File 'lib/ttfunk/table/cff/header.rb', line 22 def absolute_offset_size @absolute_offset_size end |
#header_size ⇒ Integer (readonly)
Size of the header itself.
18 19 20 |
# File 'lib/ttfunk/table/cff/header.rb', line 18 def header_size @header_size end |
#major ⇒ Integer (readonly)
CFF table major version.
10 11 12 |
# File 'lib/ttfunk/table/cff/header.rb', line 10 def major @major end |
#minor ⇒ Integer (readonly)
CFF table minor version.
14 15 16 |
# File 'lib/ttfunk/table/cff/header.rb', line 14 def minor @minor end |
Instance Method Details
#encode ⇒ String
Encode header.
34 35 36 |
# File 'lib/ttfunk/table/cff/header.rb', line 34 def encode [major, minor, header_size, absolute_offset_size].pack('C*') end |
#length ⇒ Integer
Length of header.
27 28 29 |
# File 'lib/ttfunk/table/cff/header.rb', line 27 def length 4 end |