Files
harfbuzz/test
Behdad EsfahbodandClaude Sonnet 4.6 63fb2eec90 Monotone characters fixups (#5752)
* [buffer] Fix a typo and doc string

* [buffer] Add merge_grapheme_clusters / merge_out_grapheme_clusters

Cluster merges serve two distinct purposes that require different level
gates:

- Grapheme grouping: combining marks merged into their base cluster.
  Correct gate: IS_GRAPHEMES (levels 0 and 3).
  New functions: merge_grapheme_clusters / merge_out_grapheme_clusters.

- Monotonicity maintenance: clusters merged to prevent non-monotone
  output after ligature formation, reordering, etc.
  Correct gate: IS_MONOTONE (levels 0 and 1).
  Existing functions: merge_clusters / merge_out_clusters.

Previously both paths shared merge_clusters_impl's single IS_MONOTONE
gate, so GRAPHEMES (level 3) was incorrectly blocked from merging
grapheme clusters.  This also caused a regression in the Thai and
Hangul shapers for MONOTONE_CHARACTERS (level 1): when their explicit
== MONOTONE_GRAPHEMES call-site guards were removed in #5069, the
impls' IS_MONOTONE gate no longer protected them.

Gates are now in the inline wrappers in hb-buffer.hh; the _impl
functions are gate-free.  hb_form_clusters, CoreText grapheme
detection, and the Thai/Hangul shapers are updated to call the
grapheme-semantic variants.  Fixes #5750.

Fixes https://github.com/harfbuzz/harfbuzz/issues/5751
Fixes https://github.com/harfbuzz/harfbuzz/issues/5750

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* [thai] Adjust grapheme merging logic

* [hangul] Tweak grapheme merging

---------

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-02-20 11:25:24 -07:00
..
2026-02-11 13:12:30 -07:00
2026-02-20 11:25:24 -07:00
2026-01-20 14:47:54 -08:00
2026-02-12 15:26:19 -07:00