从右到左的字体显示

发布于 2024-10-04 22:31:43 字数 192 浏览 0 评论 0原文

我正在设计一个基于android平台的应用程序。

我想在我的应用程序中显示从右到左的字符串。我已将 TTF 字体包含到资源文件夹中,并且我的输出会受到此字体的影响。

在阿拉伯语或波斯语中,字符可以粘在一起,但在输出(显示)中,它们是分开的。 例如,我想显示“?????”,但在显示中却显示:“?????”。

我应该怎么办?

I am designing an application based on android platform.

I want to show Right To Left strings in my application. I have included a TTF font into asset folder and my output is affected based on this font.

In Arabic or Persian languages characters Can stick together but in output (display), these are separated.
for example, I want to show "السلام" but in display it shows: "ا ل س ل ا م".

what should I do?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

别低头,皇冠会掉 2024-10-11 22:31:43

您的问题可能来自字距调整属性。已经有一个关于此的问题已经得到解答,不幸的是没有简单的方法来调整它。

如何在 Android TextView 中调整文本字距调整?

Your problem probably comes form the kerning attribute. There is already a question that has been answered about this and unfortunately there is no easy way to adjust it.

How to adjust text kerning in Android TextView?

七堇年 2024-10-11 22:31:43

您也可以尝试使用 SpanningString 但您需要解析它并更改每个单词的字符间距

You can also try using a SpanningString but you would need to parse it and change the character spacing for each of the words

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文