Unity TextMesh Pro 中的双向文本 [英] Bi-directional text in Unity TextMesh Pro

查看:52
本文介绍了Unity TextMesh Pro 中的双向文本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我最近在 unity 中发现了 TextMesh Pro,它很棒,但我有 1 个问题.

当我用英语文本 (ltr) 写 rtl(从右到左)文本时,英语单词会与所有文本一起翻转.

我该怎么办?是否有需要更改的设置?

提前致谢

例如:作为שלום

应该是:sa שלום

解决方案

您需要这个字符:

(那里有一个角色,相信我)不相信我?;) 尝试突出显示这一行.

它被称为

还有相应的从左到右标记可以再次翻转.实际上,将任何一个放在可以复制的地方都很难,我已经将 RTL 放在电子邮件草稿中多年(几乎从那部漫画开始),但如果我尝试发送电子邮件,它被剥离了.同样,我现在已经四次失败了,无法在这篇文章中包含 LTR 标记.

明白了:

HTML ‮‭,从这个答案的 HTML 中提取出来(维基百科和其他两个网站上给出的数值是错误,或者至少没有给出想要的结果)

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 שלום

解决方案

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).

这篇关于Unity TextMesh Pro 中的双向文本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆