Class: TTFunk::Table::Cff::Header

Inherits:
SubTable
  • Object
show all
Defined in:
lib/ttfunk/table/cff/header.rb

Overview

CFF Header.

Instance Attribute Summary collapse

Attributes inherited from SubTable

#file, #table_offset

Instance Method Summary collapse

Methods inherited from SubTable

#eot?, #initialize, #read

Constructor Details

This class inherits a constructor from TTFunk::SubTable

Instance Attribute Details

#absolute_offset_sizeInteger (readonly)

Size of all offsets from beginning of table.

Returns:

  • (Integer)
Source Code
lib/ttfunk/table/cff/header.rb, line 22
22
def absolute_offset_size
23
  @absolute_offset_size
24
end

#header_sizeInteger (readonly)

Size of the header itself.

Returns:

  • (Integer)
Source Code
lib/ttfunk/table/cff/header.rb, line 18
18
def header_size
19
  @header_size
20
end

#majorInteger (readonly)

CFF table major version.

Returns:

  • (Integer)
Source Code
lib/ttfunk/table/cff/header.rb, line 10
10
def major
11
  @major
12
end

#minorInteger (readonly)

CFF table minor version.

Returns:

  • (Integer)
Source Code
lib/ttfunk/table/cff/header.rb, line 14
14
def minor
15
  @minor
16
end

Instance Method Details

#encodeString

Encode header.

Returns:

  • (String)
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

#lengthInteger

Length of header.

Returns:

  • (Integer)
Source Code
lib/ttfunk/table/cff/header.rb, line 27
27
def length
28
  4
29
end