如何在网络(和 PDF)上可靠地呈现高棉(印度)字体?
我在让高棉字体(柬埔寨的印度文字)跨平台(Mac、Windows、Linux)在网络上可靠地呈现时遇到了很多麻烦。
Google 网络字体最近添加了高棉语,这似乎是最好的选择。然而,我还没有成功让高棉语字体在任何 Mac 或 Linux 系统上运行。我可以通过从 http://khmeros.info 安装高棉语 Unicode 安装程序来让它们在 Windows 上工作但不仅仅是将 Google 的字体包含在 HTML 文件中。
例如,请参阅全新 Windows 安装上的 Google 网络字体页面的此屏幕截图。您可以看到使用的是默认的 Windows 高棉字体(uuuuugly!),而不是 Danh 的漂亮字体。
我这里有另一个测试文件: http://dl.dropbox.com/u/634/ khmer_test.html。对于第一个测试,您应该看到网络字体和默认系统字体类似的内容(假设您有哈努曼安装)。我还没有找到一个系统可以让这两个例子都能可靠地工作。
任何帮助将不胜感激。我的主要目标是让它在网站上运行;第二个目标是让高棉语(和其他印度字体)在 PDF 生成器中工作,例如 iText (尽管我知道 iText本身不支持印度字体——我希望类似的东西也能支持)。
I've been having a world of trouble getting Khmer fonts (an Indic script of Cambodia) to render reliably on the web across platforms (Mac, Windows, Linux).
Google web fonts recently added Khmer, which seems like the best bet. However, I have not been successful getting Khmer fonts to work on any Mac or Linux system. I can get them to work on Windows by installing the Khmer Unicode installer from http://khmeros.info but not by just including Google's font in an HTML file.
For example, see this screenshot of the Google web fonts page on a fresh Windows installation. You can see that the default Windows Khmer font (uuuuugly!) is being used instead of Danh's pretty fonts.
I have another test file here: http://dl.dropbox.com/u/634/khmer_test.html. For the first test, you should see something like this for both the web font and the default system font (assuming you have Hanuman installed). I have yet to find a system where both examples work reliably.
Any help would be greatly appreciated. My primary goal is to get this working on a website; a secondary goal is to get Khmer (and other Indic fonts) working in a PDF generator like iText (although I am aware iText itself does not support Indic fonts -- I'm hoping something similar does).
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
每个柬埔寨Windows用户总是删除名为:KhmerMool和Khmer Kampot的字体名称。然后他们也更改了 regedit 中的默认高棉语字体。您可以查看 http://thelifeandwork.blogspot .com/2010/01/changing-default-khmer-font-in-windows.html 。我不确定 PDF 中的高棉字体和其他印度字体。当我从 PDF 复制高棉语 unicode 放入 OpenOffice 或 Office Word 或 LibreOffice 时,我总是遇到问题。
Every Cambodian Windows users are always delete the font name called: KhmerMool and Khmer Kampot. Then they change the default Khmer font in regedit too. You can check at http://thelifeandwork.blogspot.com/2010/01/changing-default-khmer-font-in-windows.html . I'm not sure about Khmer font and other Indic font in PDF. I always have problem when i copy Khmer unicode from PDF to put in OpenOffice or Office Word or LibreOffice.
高棉语 Unicode 在网络上显示,现在总会通过 Google Webfont 解决,请参考。
如果您想通过使用 iText 转换来在 PDF 中显示高棉语,您可以查看以下帖子:
它们是目前还不支持显示。
但是,就在今天,我可以通过修改 iText (5.5.4-SNAPSHOT) 的源代码来使其工作,正如我在帖子中所述: http://ask.osify.com/qa/613,尚未发布,因为它刚刚开始测试。
更新于 13/01/2016
Khmer Unicode displays on the web, it will always solve now by Google Webfont, please refer to that.
And if you want to have Khmer display in PDF by converting using iText, you can see following post:
They are currently not yet support the display yet.
But, just today I can get it works by modifying the source code of iText (5.5.4-SNAPSHOT) as I just stated in my post: http://ask.osify.com/qa/613, not yet be able to publish since it's just start in testing around.
Updated 13/01/2016