Class: TTFunk::Table::Kern
- Inherits:
-
TTFunk::Table
- Object
- TTFunk::Table
- TTFunk::Table::Kern
- Defined in:
- lib/ttfunk/table/kern.rb,
lib/ttfunk/table/kern/format0.rb
Defined Under Namespace
Classes: Format0
Instance Attribute Summary collapse
-
#tables ⇒ Object
readonly
Returns the value of attribute tables.
-
#version ⇒ Object
readonly
Returns the value of attribute version.
Attributes inherited from TTFunk::Table
Class Method Summary collapse
Methods inherited from TTFunk::Table
#exists?, #initialize, #raw, #tag
Constructor Details
This class inherits a constructor from TTFunk::Table
Instance Attribute Details
#tables ⇒ Object (readonly)
Returns the value of attribute tables.
7 8 9 |
# File 'lib/ttfunk/table/kern.rb', line 7 def tables @tables end |
#version ⇒ Object (readonly)
Returns the value of attribute version.
6 7 8 |
# File 'lib/ttfunk/table/kern.rb', line 6 def version @version end |
Class Method Details
.encode(kerning, mapping) ⇒ Object
9 10 11 12 13 14 15 |
# File 'lib/ttfunk/table/kern.rb', line 9 def self.encode(kerning, mapping) return nil unless kerning.exists? && kerning.tables.any? tables = kerning.tables.map { |table| table.recode(mapping) }.compact return nil if tables.empty? [0, tables.length, tables.join].pack("nnA*") end |