Class: TTFunk::Table::Dsig

Inherits:
TTFunk::Table show all
Defined in:
lib/ttfunk/table/dsig.rb

Overview

Digital Signature (DSIG) table.

Defined Under Namespace

Classes: SignatureRecord

Constant Summary collapse

TAG =

Table tag.

'DSIG'

Instance Attribute Summary collapse

Attributes inherited from TTFunk::Table

#file, #length, #offset

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from TTFunk::Table

#exists?, #initialize, #raw

Constructor Details

This class inherits a constructor from TTFunk::Table

Instance Attribute Details

#flagsInteger (readonly)

Permission flags.

Returns:

  • (Integer)
Source Code
lib/ttfunk/table/dsig.rb, line 43
43
def flags
44
  @flags
45
end

#signaturesArray<SignatureRecord> (readonly)

Signature records.

Returns:

Source Code
lib/ttfunk/table/dsig.rb, line 47
47
def signatures
48
  @signatures
49
end

#versionInteger (readonly)

Version umber of this table.

Returns:

  • (Integer)
Source Code
lib/ttfunk/table/dsig.rb, line 39
39
def version
40
  @version
41
end

Class Method Details

.encode(dsig) ⇒ String

Encode table.

Note: all signatures will be lost. This encodes an empty table regardless whether the supplied table contains any signtaures or not.

Parameters:

Returns:

  • (String)
Source Code
lib/ttfunk/table/dsig.rb, line 59
59
def self.encode(dsig)
60
  return unless dsig
61
62
  # Don't attempt to re-sign or anything - just use dummy values.
63
  # Since we're subsetting that should be permissible.
64
  [dsig.version, 0, 0].pack('Nnn')
65
end

Instance Method Details

#tagString

Table tag.

Returns:

  • (String)
Source Code
lib/ttfunk/table/dsig.rb, line 70
70
def tag
71
  TAG
72
end