Currently we need to display thai in our game, which use cocos2dx 2.x game engine.
But some fonts are not correctly displayed.
Original text:
ยินดีต้อนรับสู่{p0} ขอให้ท่านเล่นเกมให้สนุก
Displayed in vs code(correct in vscode):
Displayed in sublime 3(wrong in sublime 3, all punctuation marks are wrongly displayed):
Displayed in our game(some punctuation marks are wrongly displayed):
Same result even fontFamily setting in vscode and sublime 3 are same.
What's the reason of this? How can I solve it?
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.