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.
56 57 58 |
# File 'lib/hexapdf/font/true_type/table/cmap.rb', line 56 def tables @tables end |
#version ⇒ Object
The version of the cmap table.
53 54 55 |
# File 'lib/hexapdf/font/true_type/table/cmap.rb', line 53 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.
61 62 63 |
# File 'lib/hexapdf/font/true_type/table/cmap.rb', line 61 def preferred_table tables.select(&:unicode?).max_by(&:format) end |