目前我们需要在游戏中显示泰语,使用 cocos2dx 2.x 游戏引擎。
但是有些字体没有正确显示。
原文:
ยินดีต้อนรับสู่{p0} ขอให้ท่านเล่นเกมให้สนุก</p>
在 sublime 3 中显示(在 sublime 3 中显示错误,所有标点符号都显示错误):
即使 vscode 和 sublime 3 中的 fontFamily 设置相同,结果也相同。
这是什么原因?我该如何解决?
After some researches, I have solved this problem in our game.
Actually, each of these punctuations is a single character in Unicode.
But they need to be combined with other characters, which means their widths is zero.
I guess sublime 3 haven't handled this logic in rendering texts yet.
For our game, I set the widths of these special characters to zero, and it works fine now.