Class: HexaPDF::Font::TrueType::Table::Name
- Inherits:
-
HexaPDF::Font::TrueType::Table
- Object
- HexaPDF::Font::TrueType::Table
- HexaPDF::Font::TrueType::Table::Name
- Defined in:
- lib/hexapdf/font/true_type/table/name.rb
Overview
The ‘name’ table contains the human-readable names for features, font names, style names, copyright notices and so on.
See: developer.apple.com/fonts/TrueType-Reference-Manual/RM06/Chap6name.html
Defined Under Namespace
Constant Summary collapse
- NAME_MAP =
Table for mapping symbolic names to name_id codes.
{ copyright: 0, font_family: 1, font_subfamily: 2, unique_subfamily: 3, font_name: 4, version: 5, postscript_name: 6, trademark: 7, manufacturer: 8, designer: 9, description: 10, vendor_url: 11, designer_url: 12, license: 13, license_url: 14, preferred_family: 16, preferred_subfamily: 17, compatible_full: 18, sample_text: 19, postscript_cid_name: 20, wws_family: 21, wws_subfamily: 22, }.freeze
Constants inherited from HexaPDF::Font::TrueType::Table
Instance Attribute Summary collapse
-
#format ⇒ Object
The format of the table.
-
#language_tags ⇒ Object
The mapping of language IDs starting from 0x8000 to language tags conforming to IETF BCP 47.
-
#records ⇒ Object
The name records.
Attributes inherited from HexaPDF::Font::TrueType::Table
Instance Method Summary collapse
-
#[](name_or_id) ⇒ Object
Returns an array with all available entries for the given name identifier (either a symbol or an ID).
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
#format ⇒ Object
The format of the table.
154 155 156 |
# File 'lib/hexapdf/font/true_type/table/name.rb', line 154 def format @format end |
#language_tags ⇒ Object
The mapping of language IDs starting from 0x8000 to language tags conforming to IETF BCP 47.
161 162 163 |
# File 'lib/hexapdf/font/true_type/table/name.rb', line 161 def @language_tags end |
#records ⇒ Object
The name records.
157 158 159 |
# File 'lib/hexapdf/font/true_type/table/name.rb', line 157 def records @records end |
Instance Method Details
#[](name_or_id) ⇒ Object
Returns an array with all available entries for the given name identifier (either a symbol or an ID).
See: NAME_MAP
167 168 169 |
# File 'lib/hexapdf/font/true_type/table/name.rb', line 167 def [](name_or_id) @records[name_or_id.kind_of?(Symbol) ? NAME_MAP[name_or_id] : name_or_id] end |