Files
harfbuzz/test/subset/data/tests/cmap_identity_delta.tests
artemkulyk 7cc20b8f70 [subset/cmap] Emit idDelta for zero-delta identity runs (#6284)
serialize_rangeoffset_glyid() treated every zero idDelta as "this
range needs a glyphIdArray", which is what to_ranges() emits for
non-run ranges. A real run with delta 0 (glyph id == codepoint) got
the same treatment and cost two bytes per codepoint.

Only zero deltas are ambiguous. Check those against the mapping and
keep the ones that are genuinely identity as delta ranges.

Adds a subset test with a small hand-built glyf font whose cmap maps
U+0001..U+0007 to gids 1..7.

Tested with: meson test -C build

Assisted-by: opencode
2026-09-29 17:11:17 -06:00

13 lines
280 B
Plaintext

# Identity runs in cmap format 4 (glyph id == codepoint) must be
# written as idDelta ranges, not glyphIdArray ranges.
FONTS:
cmap_identity_glyf.ttf
PROFILES:
default.txt
SUBSETS:
U+0001,U+0002,U+0003,U+0004,U+0005,U+0006,U+0007
U+0001,U+0002,U+0003,U+0004,U+0006,U+0007
U+0005