我怎样才能自动“重塑”复杂的脚本?

发布于 2024-11-04 04:29:28 字数 693 浏览 5 评论 0原文

问题

我尝试在移动设备(特别是 Android、BlackBerry 手机和 BlackBerry PlayBook)上使用复杂的脚本(例如阿拉伯语和孟加拉语)显示少量文本。 (该应用是 Allergy Traveler)这些设备都无法正确显示文本,但出于不同的原因。

在 Android 和 PlayBook 上,我可以提供一种字体,在这种情况下可以显示字符,但字符连接不正确。每个字符的显示都不考虑上下文。

在 BlackBerry 上,设备没有合适的字体。我可以提供字体,但字体文件远远超过最大字体大小(70kB)。

建议的解决方案:

我认为正确使用上下文来显示单词的过程称为重塑。据推测,这会获取文本并返回要显示的替代字符集。我建议的解决方案是提前进行此重塑。在 Android 上,这将确保文本正确使用上下文,而在 BlackBerry 上,这将允许我删除未使用的字符,并减小字体大小。

问题:

是否有任何 API 可以进行此“重塑”或任何其他建议?我愿意在 Windows 或 Linux 上使用任何技术(例如 Win32 API、Perl、Python、Java...)

感谢您的所有建议。

Problem:

I'm trying to display a small amount of text using complex scripts such as Arabic and Bengali on mobile devices (specifically Android, BlackBerry phones, and BlackBerry PlayBook). (The app is Allergy Traveler) These devices both fail to correctly display the text, but for different reasons.

On Android and PlayBook, I can supply a font in which case the characters display, but the characters are not connected correctly. Each character displays without considering the context.

On BlackBerry, the device doesn't have appropriate fonts. I can supply a font, but the font file far exceeds the maximum font size (70kB).

Proposed Solution:

I think the process of correctly using context to display a word is called reshaping. Presumably, this takes the text and returns an alternative set of characters to display. My proposed solution is to do this reshaping in advance. On Android, this would ensure the text correctly uses the context, and on BlackBerry, this would allow me to remove unused characters, and reduce the font size.

Question:

Are there any APIs to do this "reshaping" or any other suggestions? I'm willing to use any technology on Windows or Linux (eg a Win32 API, Perl, Python, Java, ...)

Thanks for all the suggestions.

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

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

发布评论

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

评论(2

变身佩奇 2024-11-11 04:29:28

要在 Android 上重塑阿拉伯语,可以使用 Amr Gawish 的阿拉伯语重塑器框架,请查看 http://bar.amr -gawish.com/
但是,您应该注意,虽然它可以正确地重塑和连接正常的阿拉伯字母和文本,但如果文本包含变音符号,则无法连接阿拉伯字母。

我注意到 Android 市场中的一个应用程序可以用变音符号连接/重塑阿拉伯文本,但我不确定他们用来做什么,它可能是他们自己的内部框架。我还对寻找重塑 API 感兴趣,特别是那些也可以处理阿拉伯语变音符号的 API。

希望以上链接有帮助!如果您发现更好的东西,请告诉我们。

编辑:以下内容也可以做变音符号 - https://github.com/AhmedEssam/Better-Arabic-重塑者

For reshaping arabic on android it is possible to so using Amr Gawish's arabic reshaper framework, check out http://bar.amr-gawish.com/.
However, you should note that although it reshapes and joins normal arabic letters and text correctly, it isn't able to join arabic letters if the text contains diacritics.

I have noticed an app in the android marketplace that joins/reshapes arabic text with diacritics but I'm not sure what they've used to do so, it may perhaps be their own internal framework. I'm also interested in finding reshaping APIs, in particular ones that can deal with arabic diacritics too.

Hope the above link help! Let us know if you find anything better.

edit: the following can do diacritics too - https://github.com/AhmedEssam/Better-Arabic-Reshaper

狠疯拽 2024-11-11 04:29:28

我很确定 Windows 有这方面的 api。首先,请查看 Microsoft 的 Windows Glyph Processing

I'm pretty sure that Windows has apis for this. As a start, take a look at Microsoft's write-up of Windows Glyph Processing.

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