Sha256: 748f89afdac80bb2b32be39bb5290ea07b7db42caf8b9d30e61cf90148a6ce87

Contents?: true

Size: 687 Bytes

Versions: 5

Compression:

Stored size: 687 Bytes

Contents

# frozen_string_literal: true

module TTFunk
  class Table
    class Cff < TTFunk::Table
      class Header < TTFunk::SubTable
        # cff format version numbers
        attr_reader :major
        attr_reader :minor

        # size of the header itself
        attr_reader :header_size

        # size of all offsets from beginning of table
        attr_reader :absolute_offset_size

        def length
          4
        end

        def encode
          [major, minor, header_size, absolute_offset_size].pack('C*')
        end

        private

        def parse!
          @major, @minor, @header_size, @absolute_offset_size = read(4, 'C*')
        end
      end
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
ttfunk-1.7.0 lib/ttfunk/table/cff/header.rb
ttfunk-1.6.2.1 lib/ttfunk/table/cff/header.rb
ttfunk-1.6.2 lib/ttfunk/table/cff/header.rb
ttfunk-1.6.1 lib/ttfunk/table/cff/header.rb
ttfunk-1.6.0 lib/ttfunk/table/cff/header.rb