问题
I have recently discovered the TextMesh Pro in unity and it is amazing but I have 1 issue.
When I write rtl (right to left) text with English text (ltr) the English word gets flip with all the text.
What should I do? Is there a setting that I need to change?
Thanks in advance
Example: as שלום
would be: sa שלום
回答1:
You need this character:
(There's a character there, trust me) don't trust me? ;) Try highlighting this line.
It's called the right to left mark.
XKCD had a strip about it:
There's also the corresponding Left to Right mark to flip things back again. Actually getting either one in a place where you can copy it is hard, I've had the RTL one sitting in a draft email for years at this point (pretty much ever since that comic), though if I try to send the email, it gets stripped out. Similarly, I've failed four times now to capture the LTR mark to include in this post.
Got it:
HTML ‮
and ‭
, extracted from the HTML of this very answer (the numerical values given on wikipedia and two other sites were wrong, or at least, not giving the desired result).
来源:https://stackoverflow.com/questions/52294964/bi-directional-text-in-unity-textmesh-pro