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.
Source Code
lib/ttfunk/table/cff/header.rb, line 22
22 | def absolute_offset_size |
23 | @absolute_offset_size
|
24 | end
|
#header_size ⇒ Integer (readonly)
Size of the header itself.
Source Code
lib/ttfunk/table/cff/header.rb, line 18
18 | def header_size |
19 | @header_size
|
20 | end
|
#major ⇒ Integer (readonly)
CFF table major version.
Source Code
lib/ttfunk/table/cff/header.rb, line 10
10 | def major |
11 | @major
|
12 | end
|
#minor ⇒ Integer (readonly)
CFF table minor version.
Source Code
lib/ttfunk/table/cff/header.rb, line 14
14 | def minor |
15 | @minor
|
16 | end
|
Instance Method Details
#encode ⇒ String
Encode header.
Source Code
lib/ttfunk/table/cff/header.rb, line 34
34 | def encode |
35 | [major, minor, header_size, absolute_offset_size].pack('C*') |
36 | end
|
#length ⇒ Integer
Length of header.
Source Code
lib/ttfunk/table/cff/header.rb, line 27
27 | def length |
28 | 4
|
29 | end
|