skrifa

Module charmap

source
Expand description

Mapping of characters (codepoints, not graphemes) to nominal glyph identifiers.

If you have never run into character to glyph mapping before Glyph IDs and the ‘cmap’ table might be informative.

The functionality in this module provides a 1-to-1 mapping from Unicode characters (or Unicode variation sequences) to nominal or “default” internal glyph identifiers for a given font. This is a necessary first step, but generally insufficient for proper layout of complex text or even simple text containing diacritics and ligatures.

Comprehensive mapping of characters to positioned glyphs requires a process called shaping. For more detail, see: Why do I need a shaping engine?

Structs§

  • Mapping of characters to nominal glyph identifiers.
  • Cacheable indices of selected mapping tables for materializing a character map.
  • Iterator over all mappings of character to nominal glyph identifier in a character map.
  • Iterator over all mappings of character and variation selector to nominal glyph identifier in a character map.

Enums§

  • Result of mapping a codepoint with a variation selector.