Skip to content

[shaping] better face selection for mixed RTL/LTR with marks#245

Merged
benoitkugler merged 1 commit intomainfrom
better-face-segmentation
Mar 27, 2026
Merged

[shaping] better face selection for mixed RTL/LTR with marks#245
benoitkugler merged 1 commit intomainfrom
better-face-segmentation

Conversation

@benoitkugler
Copy link
Copy Markdown
Contributor

When shaping the string \u200fabc, out segmentation process produces two runs (Input) with correct direction and script, but with different fonts. This is suboptimal : we should not change font for runes such as \u200f (a RTL mark).

This issue is that our font selection function only works one Input at a time, whereas a "cross" run analysis is required here.

This PR aims at fixing this issue, by back propagating the selected font to previous Inputs.

This is a minor change which should not impact the majority of use cases.

Copy link
Copy Markdown
Member

@whereswaldon whereswaldon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you! This is a tricky case indeed.

@benoitkugler benoitkugler merged commit 02d168f into main Mar 27, 2026
14 checks passed
3ace pushed a commit to unidoc/typesetting that referenced this pull request Apr 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants