mirror of
https://github.com/storytold/harfbuzz.git
synced 2026-11-22 23:41:03 +01:00
kerx format 1 entries contain value-array indices and terminate lists with a separate 0xFFFF word. The shared kern/kerx driver instead treated the indices as byte offsets and used the legacy kern low-bit terminator. Keep the legacy kern behavior, but read kerx indices directly and stop before popping a glyph for 0xFFFF. Validate kerx values as they are read so a short list can terminate while glyphs remain on the stack. Mark the dependencies of adjustments to earlier stacked glyphs unsafe to break. Add regressions for positive and negative odd values, nonzero indices, short lists, retained stack entries, and glyph flags. All 275 Meson tests pass, including the shaping suite and both font callback backends. Related: https://github.com/harfbuzz/harfbuzz/issues/6536 Assisted-by: OpenAI Codex