Class: Fontisan::Tables::Cmap
- Inherits:
-
Binary::BaseRecord
- Object
- BinData::Record
- Binary::BaseRecord
- Fontisan::Tables::Cmap
- Defined in:
- lib/fontisan/tables/cmap.rb
Overview
Parser for the ‘cmap’ (Character to Glyph Index Mapping) table
The cmap table maps character codes to glyph indices. It supports multiple encoding formats to accommodate different character sets and Unicode planes.
This implementation focuses on:
-
Format 4: Segment mapping for BMP (Basic Multilingual Plane, U+0000-U+FFFF)
-
Format 12: Segmented coverage for full Unicode support
Reference: OpenType specification, cmap table
Constant Summary collapse
- PLATFORM_UNICODE =
Platform IDs
0- PLATFORM_MACINTOSH =
1- PLATFORM_MICROSOFT =
3- ENC_MS_UNICODE_BMP =
Microsoft Encoding IDs
1- ENC_MS_UNICODE_UCS4 =
Unicode BMP (UCS-2)
10
Instance Method Summary collapse
-
#unicode_mappings ⇒ Object
Parse encoding records and subtables.
Methods inherited from Binary::BaseRecord
Instance Method Details
#unicode_mappings ⇒ Object
Parse encoding records and subtables
35 36 37 |
# File 'lib/fontisan/tables/cmap.rb', line 35 def unicode_mappings @unicode_mappings ||= parse_mappings end |