如何用一种颜色绘制基本字形,并用另一种颜色绘制附加的变音符号?
MS Word 的希伯来语和阿拉伯语版本具有此功能。我想在 Windows 桌面应用程序中使用 .Net (可能通过 win-api 调用)来实现这一点。
MS Word has this capability in its Hebrew and Arabic versions. I would like to achieve this in a windows desktop application, using .Net (may be with win-api calls).
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
正如 Otaku 此处提供的链接中所述,当前的富文本编辑控件无法处理此问题(除非您使用 Q 中的 hack OP,这似乎不是一个很好的解决方案)。
您可以自己编写代码来手动执行此操作,完全放弃文本编辑控件,但这可能意味着大量的工作。 Microsoft 花了数年时间才获得在 MSWord 中组合变音符号的支持。我会搜索具有此功能的开源软件,并看看其他开发人员是如何做到这一点的。不过,它可能很难找到,而且您可能必须走出 .NET 领域。也许 OpenOffice 可以做到这一点?
此讨论也可能有所帮助。
不过,我担心您会发现必须手动解析 Unicode 并将颜色分配给正确的字形。如果你想完整,那是一项艰巨的工作。
As explained in the link provided by Otaku here, current rich text edit controls can not handle this (unless you go for the hack OP in that Q did, which did not seem like a very good solution).
You could write code to do this manually yourself, ditching the text edit control completely, but that would probably mean a lot of work. It took Microsoft years to get support for combining diacritics working properly in MSWord. I would search for open source software that has this capability, and look at how other developers have done it. It might be hard to find, though, and you would likely have to step outside .NET-land. Maybe OpenOffice can do this?
This discussion might also be of help.
I am afraid that you will find, though, that you'll have to manually parse the Unicode and assign colors to the correct glyphs. If you want to be complete, that is one heck of a job.