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
Text trimming is inconsistent between RTL and LTR views
Text trimming for RTL text (e.g. Hebrew) is broken - no text is showing
Text trimming when RTL text is combined with LTR text, is showing but incorrectly (does not aligned properly to right)
To Reproduce
Add this to Control Catalog TextBlock page -
<TextBlock Margin="0,0,10,0"
Text="Lorem ipsum dolor sit amet, consectetur adipiscing elit."
TextTrimming="CharacterEllipsis" />
<TextBlock Margin="0,0,10,0"
Text="Lorem ipsum dolor sit amet, consectetur adipiscing elit."
TextTrimming="WordEllipsis" />
<TextBlock Margin="0,0,10,0"
Text="טקסט בשפה עברית אמור להיות מוצג מימין לשמאל"
FontFamily="Arial"
TextTrimming="CharacterEllipsis" />
<TextBlock Margin="0,0,10,0"
Text="טקסט בשפה עברית אמור להיות מוצג מימין לשמאל"
FontFamily="Arial"
TextTrimming="WordEllipsis" />
<TextBlock Margin="0,0,10,0"
Text="אחד שתיים שלוש Four חמש Six שבע Eight"
FontFamily="Arial"
TextTrimming="CharacterEllipsis" />
<TextBlock Margin="0,0,10,0"
Text="אחד שתיים שלוש Four חמש Six שבע Eight"
FontFamily="Arial"
TextTrimming="WordEllipsis" />
LTR -
Here only the English text is OK.
RTL -
Here all text is not displaying correctly, including English.
Expected behavior
Text to be displayed correctly when trimmed.
I will use GitHub to demonstrate as I assume you can't read Hebrew -
טקסט בשפה עברית אמור להיות מוצג מימין לשמאל אחד שתיים שלוש Four חמש Six שבע Eight
Avalonia version
master
OS
No response
Additional context
I believe the issue is due to the TextBlock's FlowDirection is used when trimming and not the "resolved" flow direction.
The text was updated successfully, but these errors were encountered:
@adirh3 please have a look at my linked PR. It does similar things as your PR but also has different and less breaking changes in other parts. I hope you don't mind.
@adirh3 please have a look at my linked PR. It does similar things as your PR but also has different and less breaking changes in other parts. I hope you don't mind.
Thanks for sharing! I don't mind at all, I just wanted to understand this code a bit.
I will try out your branch with some Hebrew strings and see how it works, thanks!
Describe the bug
There are multiple issues -
To Reproduce
Add this to Control Catalog TextBlock page -
LTR -
Here only the English text is OK.
RTL -
Here all text is not displaying correctly, including English.
Expected behavior
Text to be displayed correctly when trimmed.
I will use GitHub to demonstrate as I assume you can't read Hebrew -
טקסט בשפה עברית אמור להיות מוצג מימין לשמאל
אחד שתיים שלוש Four חמש Six שבע Eight
Avalonia version
master
OS
No response
Additional context
I believe the issue is due to the TextBlock's
FlowDirection
is used when trimming and not the "resolved" flow direction.The text was updated successfully, but these errors were encountered: