You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Bidi control characters (RLO, RLE, PDF, isolates) in text are ignored on Skia #26722
On Skia, the Unicode bidi control characters in the text of a TextBlock, TextBox, PasswordBox (when it shows its password) or RichEditBox have no effect: U+202A–U+202E (LRE, RLE, PDF, LRO, RLO) and U+2066–U+2069 (LRI, RLI, FSI, PDI) are laid out as if they weren't there. For example, with FlowDirection="LeftToRight":
Text
Uno Skia
WinUI 3
1 + RLO + abcd + PDF
1abcd
1dcba
x + RLE + ab!! + PDF + y
x ab!! y
x !!ab y
The same happens whether or not a Run in the text has its own FlowDirection.
The cause: UnicodeText passes ICU an explicit embedding level for every character (ubidi_setPara with an embeddingLevels array), and ICU ignores the explicit formatting characters when it gets such an array.
Expected behavior 🎯
As on WinUI, the bidi control characters are applied by the Unicode Bidirectional Algorithm: 1dcba and x !!ab y above.
How to reproduce it (as minimally and precisely as possible) 🔬
Run on Skia Desktop: the first line reads 1abcd, the second x ab!! y.
Run the same XAML on WinUI 3: 1dcba and x !!ab y.
Workaround 🛠️
None in XAML. Split the text into Runs and give the right-to-left part its own FlowDirection; that covers embeddings and overrides of a whole run only.
Affected platforms 📱💻🖥️
All platforms 🌍 (every Skia target; Windows App SDK is not affected)
Uno.Sdk version (and other relevant versions) 📦
master (7.x).
IDE version 🧑💻
Not relevant.
Anything else we need to know? 💬
Related: #25291 (the same UnicodeText bidi setup embeds Latin text in a right-to-left TextBlock).
Activity