I’m encountering an issue: the underlines are not fully displayed while setting up Arabic fonts.
I’ve tried using segoeui SDF Arabic from RTLTMPro and NotoSansArabic fonts, but unfortunately, both fail to display underlines properly, with some pixels appearing incomplete as in the below image.
segoeui:
NotoSans:
Despite adjusting the sampling point size and atlas resolution of the font assets, and the underline offset and thickness, the issue persists.
Could this be related to font asset settings? How can I determine the correct settings for each font to address this problem?
Unfortunately, the RTL - TMP is not officially supported and is currently in maintenance mode. We are currently focusing our efforts on a built-in solution to support RTL and many other scripts and languages.
@HugoBD-Unity Thank you for the reply.
Does this imply that full RTL support will be included in TextMeshPro in future releases?
Is there a specific version scheduled to incorporate this feature, perhaps in 4.0.0?
I’ve devised a workaround for the issue.
Essentially, the problem doesn’t stem from RTLTMPro but arises when utilizing TMP_Text.m_isRightToLeft to reverse the text order. (TMPro version: 3.0.7)
The underline display problem occurs when enabling “Enable RTL Editor,” irrespective of the font asset.
Though I’m uncertain about the root cause, I addressed it by abstaining from using TMPro’s RTL feature.
Here’s a summary of my approach for anyone facing the same issue to refer to:
In RTLTextMeshPro.cs, removed all lines setting isRightToLeftText and added a enableRTL boolean member to replace it.
In RTLTextMeshProEditor.cs, rewrote DrawTextInput() to handle RTL text without setting values for m_IsRightToLeftProp and m_RtlText.
Deleted line 130 finalText.Reverse() in RTLTestMeshPro.cs since TMPro no longer reverses the text.
Rewrote the RichTextFixer.Fix(output) method to correct the order of RichTextTags by swapping the positions of and .
While the solution I implemented is somewhat complex, I would greatly appreciate any guidance or suggestions for potentially improving it.