Skip to content

Conversation

@uniyeh
Copy link

@uniyeh uniyeh commented Jan 30, 2024

Fixed the underline displaying issue by self-implementing reversing the text instead of reversing with TMPro.

Detailed implementation:

  1. In RTLTextMeshPro.cs, removed all lines setting isRightToLeftText and added an enableRTL boolean member to replace it.
  2. In RTLTextMeshProEditor.cs, rewrote DrawTextInput() to handle RTL text without setting values for m_IsRightToLeftProp and m_RtlText.
  3. Deleted line 130 finalText.Reverse() in RTLTestMeshPro.cs since TMPro no longer reverses the text.
  4. Rewrote the RichTextFixer.Fix(output) method to correct the order of RichTextTags by swapping the positions of <tag> and </tag>.

I also added a scene named "Underline" for reference.
underline

@uniyeh uniyeh changed the title Solved Issue #124 Solved Issue #124 The underlines are not correctly displayed in RTL Jan 31, 2024
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.

1 participant