Browse Source
* Add failing test for a right-to-left split inside a cluster Splitting a right-to-left shaped buffer keeps a straddling cluster's glyphs together in the leading half, but cuts the text at the requested offset instead of following them. The halves then disagree about which characters their glyphs cover: the leading half claims one character while holding the glyphs for two, and the trailing half claims a character whose glyphs it doesn't have. The left-to-right path already snaps the text boundary to the cluster. * Snap a right-to-left split to the cluster the glyphs stay with A cluster straddling the split point keeps all its glyphs in the leading half, so the text has to be cut where those glyphs end, not at the requested offset. Cutting at the offset produced two halves whose glyph and character coverage disagreed, and their shared cluster cache then described neither: measuring the trailing half returned counts that cut a cluster, and splitting it again could hand back a leading half holding every glyph and no trailing half at all - a null run that crashed the bidi reorderer. The ascending path already snapped this way; this makes the descending path match.pull/22067/head
committed by
GitHub
2 changed files with 62 additions and 5 deletions
Loading…
Reference in new issue