Class: HexaPDF::Font::TrueType::Table::Cmap
- Inherits:
-
HexaPDF::Font::TrueType::Table
- Object
- HexaPDF::Font::TrueType::Table
- HexaPDF::Font::TrueType::Table::Cmap
- Defined in:
- lib/hexapdf/font/true_type/table/cmap.rb
Overview
The ‘cmap’ table contains subtables for mapping character codes to glyph indices.
See:
Constant Summary
Constants inherited from HexaPDF::Font::TrueType::Table
Instance Attribute Summary collapse
-
#tables ⇒ Object
The available cmap subtables.
-
#version ⇒ Object
The version of the cmap table.
Attributes inherited from HexaPDF::Font::TrueType::Table
Instance Method Summary collapse
-
#preferred_table ⇒ Object
Returns the preferred of the available cmap subtables.
Methods inherited from HexaPDF::Font::TrueType::Table
calculate_checksum, #checksum_valid?, #directory_entry, #initialize, #raw_data
Constructor Details
This class inherits a constructor from HexaPDF::Font::TrueType::Table
Instance Attribute Details
#tables ⇒ Object
The available cmap subtables.
53 54 55 |
# File 'lib/hexapdf/font/true_type/table/cmap.rb', line 53 def tables @tables end |
#version ⇒ Object
The version of the cmap table.
50 51 52 |
# File 'lib/hexapdf/font/true_type/table/cmap.rb', line 50 def version @version end |
Instance Method Details
#preferred_table ⇒ Object
Returns the preferred of the available cmap subtables.
A preferred table is always a table mapping Unicode characters.
58 59 60 |
# File 'lib/hexapdf/font/true_type/table/cmap.rb', line 58 def preferred_table tables.select(&:unicode?).sort_by(&:format).last end |