Class: TTFunk::Table::Dsig
- Inherits:
-
TTFunk::Table
- Object
- TTFunk::Table
- TTFunk::Table::Dsig
- 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
-
#flags ⇒ Integer
readonly
Permission flags.
-
#signatures ⇒ Array<SignatureRecord>
readonly
Signature records.
-
#version ⇒ Integer
readonly
Version umber of this table.
Attributes inherited from TTFunk::Table
Class Method Summary collapse
-
.encode(dsig) ⇒ String
Encode table.
Instance Method Summary collapse
-
#tag ⇒ String
Table tag.
Methods inherited from TTFunk::Table
Constructor Details
This class inherits a constructor from TTFunk::Table
Instance Attribute Details
#flags ⇒ Integer (readonly)
Permission flags.
43 44 45 |
# File 'lib/ttfunk/table/dsig.rb', line 43 def flags @flags end |
#signatures ⇒ Array<SignatureRecord> (readonly)
Signature records.
47 48 49 |
# File 'lib/ttfunk/table/dsig.rb', line 47 def signatures @signatures end |
#version ⇒ Integer (readonly)
Version umber of this table.
39 40 41 |
# File 'lib/ttfunk/table/dsig.rb', line 39 def version @version 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.
59 60 61 62 63 64 65 |
# File 'lib/ttfunk/table/dsig.rb', line 59 def self.encode(dsig) return unless dsig # Don't attempt to re-sign or anything - just use dummy values. # Since we're subsetting that should be permissible. [dsig.version, 0, 0].pack('Nnn') end |