Tincture.Font.OpenType.Common (Tincture v0.1.0)

Copy Markdown View Source

The OpenType Layout common table formats, shared by GPOS and GSUB.

Both tables have the same outer structure - a script list, a feature list and a lookup list - and both reach glyphs through coverage tables. Only the innermost subtables differ: GSUB substitutes glyphs, GPOS positions them. That shared outer structure is what lives here.

The indirection is deep because the format is: a script tag selects a language system, which selects feature indices, which select lookup indices, which select lookup subtables. A parser that wants "the kerning pairs" has to walk all five levels.

Summary

Functions

filter_open_type_lookup_entries_by_features(layout_table, lookup_entries, feature_tags, script_scope)

invert_cmap_by_code(cmap_by_code)

parse_layout_table_metadata(data, table_records, tag)

parse_open_type_coverage_table(layout_table, coverage_offset)

parse_open_type_layout_table(layout_table)

parse_open_type_lookup_entries(layout_table, lookup_list_offset)

valid_unicode_codepoint?(codepoint)