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 }}
This repository has been archived by the owner on Aug 8, 2023. It is now read-only.
Our current line-breaking algorithm has a naive approach to handling text that isn't fully Left-to-Right: if the "base" direction of a label is Right-to-Left instead of LTR, it breaks lines upwards instead of downwards. This is broken two ways:
If a label starts with RTL text but contains an embedded LTR string with a line break, the two LTR lines will appear in the opposite of the expected order.
If a label with multiple lines of RTL text also has an icon, the RTL text can overlay the icon.
The fix is to break our application of the bidirectional algorithm and Arabic shaping into two passes. In the first pass, we perform bidirectional layout and shaping on the entire label as one line. After performing shaping, we go through the line to choose line break points. On the second pass, we reapply the bidirectional algorithm with the line break points pre-set in order to get the correct behavior for line breaks of embedded LTR/RTL text.
The text was updated successfully, but these errors were encountered:
Our current line-breaking algorithm has a naive approach to handling text that isn't fully Left-to-Right: if the "base" direction of a label is Right-to-Left instead of LTR, it breaks lines upwards instead of downwards. This is broken two ways:
The fix is to break our application of the bidirectional algorithm and Arabic shaping into two passes. In the first pass, we perform bidirectional layout and shaping on the entire label as one line. After performing shaping, we go through the line to choose line break points. On the second pass, we reapply the bidirectional algorithm with the line break points pre-set in order to get the correct behavior for line breaks of embedded LTR/RTL text.
The text was updated successfully, but these errors were encountered: