Files
harfbuzz/test/shape/data
Behdad Esfahbod 90417543fd [aat] Match CoreText kerx format 1 history (#6540)
* [test] Probe CoreText kerx stack behavior

Add native CoreText probes for list reuse, excess values, zero values,
duplicate pushes, repeated actions, resets, and long lists. Run them on
macOS 15 and macOS latest to establish the compatibility behavior before
changing the kerx driver.

The local baseline Meson suite passes all 275 tests. Native execution
is intentionally checked by the new macOS probe jobs.

Related: https://github.com/harfbuzz/harfbuzz/pull/6538#issuecomment-6561986849
Assisted-by: OpenAI Codex

* [test] Probe retained kerx history past eight pushes

Add an end-of-text action after twenty repeated push/action entries to
distinguish retained history from an eight-entry rolling window.

The local Meson suite passes all 275 tests.

Assisted-by: OpenAI Codex

* [test] Probe kerx history wraparound and reset reuse

Add native cases around the eight-slot boundary, actions before the
first push, a first push after ignored glyphs, and history reuse after
reset. These distinguish partial-history initialization and cursor
wraparound for the CoreText compatibility implementation.

Testing: all 275 Meson tests pass with the implementation in progress.

Assisted-by: OpenAI Codex

* [test] Verify kerx reset anchors and Arabic examples in CoreText

Measure a reset followed by another action without a push, and include
both versions of the reported Arabic font. Use mapped glyphs for ignored
prefixes so font fallback cannot affect the native position comparison.

Testing: all 275 Meson tests pass with the implementation in progress.

Assisted-by: OpenAI Codex

* [test] Probe long kerx lists after resetting history

Distinguish how reset initializes unused history slots by applying a
long list after a reset with and without a push, and after every push.

Testing: all 275 Meson tests pass with the implementation in progress.

Assisted-by: OpenAI Codex

* [aat] Match CoreText kerx format 1 history

The written kerx rules describe destructive stack pops and a reset flag.
Native CoreText retains an eight-slot circular history, initializes its
unused slots to the first glyph, and ignores reset. Each action list
walks the history independently and wraps after eight values.

Use that behavior for extended kerx while retaining legacy kern rules.
Bound the longer action-list walks by the buffer operation budget and
keep fixed-size history storage. Document the spec discrepancy and add
regressions for reuse, wraparound, initial slots, reset, and both Arabic
examples, plus terminated and unterminated over-budget lists.

Testing: all 275 Meson tests pass. HB and HR match glyph identities,
character indices, positions, and final extents for all 35 native cases
on macOS 15.8.2 and 26.6.2. Both Arabic examples match their GPOS reference.

Fixes: https://github.com/harfbuzz/harfbuzz/issues/6536
Assisted-by: OpenAI Codex

* [ci] Remove exploratory CoreText kerx probe jobs

The native measurements established the compatibility behavior, which
is now covered by the normal shaping regressions in HB and HR. Keep the
manual probe, recorded results, and discrepancy documentation without
adding two native macOS jobs to every pull request.

CI and documentation only; no code or test inputs changed.

Assisted-by: OpenAI Codex

* [test] Run kerx CoreText comparisons with shaping tests

Move the native helper and reference data from .ci into test/shape.
Run the native comparison as a normal CoreText-enabled macOS Meson
shaping test, using the existing macOS CI job. Keep the discrepancy
explanation beside the regression cases and drop the standalone Markdown.

Testing: all 275 Linux Meson tests pass. The comparison runner passes
all 35 recorded cases and rejects an injected position mismatch. The
native helper is unchanged from the macOS 15.8.2 and 26.6.2 measurements.

Assisted-by: OpenAI Codex

* [test] Keep kerx regressions in the shaping suite

Remove the API C budget test, native CoreText C helper, comparison
runner, reference JSON files, and extra Meson test target. Retain the
library fix and normal shaping regressions, with a short explanation of
the native behavior in the shaping test file.

Testing: all 275 Meson tests pass.

Assisted-by: OpenAI Codex
2026-11-01 13:35:37 -07:00
..