allegro库4.4韩文坏了
我正在使用 allegro 4.4 库。
当我打印韩文字符时,该字符被破坏。
Allegro 手册中没有英文字符。
Allegro 说“Allegro 默认使用 UTF8 编码。”
我不知道以下代码有什么问题以及需要修复什么。
textout_ex(screen,font,"한글(korean)", 24, 2,
makecol(255, 255, 255), -1);
知道如何正确打印韩文字符吗?
提前致谢。
I am working with allegro 4.4 library.
When I print a Korean character, the character is broken.
English character isn't in Allegro Manual.
Allegro says "Allegro uses UTF8 encoding by default."
I have no idea of what was wrong with the following code, and what to fix.
textout_ex(screen,font,"한글(korean)", 24, 2,
makecol(255, 255, 255), -1);
Any idea of how to print Korean characters properly?
Thanks in advance.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
听起来您没有加载具有韩语字形的字体。或者,Allegro 加载函数根本不从字体文件加载韩语字形。因此,首先检查字体以查看它是否具有您需要的字形,然后检查 Allegro 的文档以了解如何使其加载它们。
注意:仅仅因为一个库声称它支持 UTF-8 或 16 编码的字符串并不意味着它们实际上支持所有这些字形。当然,这并不意味着它们支持复杂的文本布局。我不知道韩语是否需要复杂的文本布局,但 Allegro 肯定不支持。
It sounds like you did not load a font that has Korean glyphs. Alternatively, the Allegro loading functions simply didn't load the Korean glyphs from the font file. So first check the font to see if it has the glyphs you need, then check Allegro's documentation to see how to make it load them.
Note: just because a library says that it supports strings of UTF-8 or 16 encoding does not mean that they actually support all of those glyphs. And it certainly doesn't mean that they support complex text layout. I don't know if Korean requires complex text layout, but Allegro certainly doesn't support it.