04-22-2016, 07:30 AM
Hy,
i'm not sure if i'm in the rigth forum. So maybe a moderator has to move it. I'm writing a small query tool for Xonotic, like a gamebrowser. The informations i got back from the query are shown in listviews. I use the "fonts\xolonium-regular.otf" font and a selfmade ttf-font which replaces the glyphs of "conchars.jpg" to draw the player names. To do the utf8 stuff i used the code in "utf8lib.c".
Most playernames are shown the right way as in the game. But when the name is like which is in hex "\xF0\x9F\x98\x83" i don't get the right symbol drawn. I checked the result when calling "getnchar_utf8_enabled", it is 0x0001f603. In the „xolonium-regular.otf“ file it is the right codepoint for the glyph. But how can i draw a WCHAR bigger then 0xffff. So what is the trick to draw this symbol right? I use DrawTextW(...) to do the itemdrawing in my listview.
i'm not sure if i'm in the rigth forum. So maybe a moderator has to move it. I'm writing a small query tool for Xonotic, like a gamebrowser. The informations i got back from the query are shown in listviews. I use the "fonts\xolonium-regular.otf" font and a selfmade ttf-font which replaces the glyphs of "conchars.jpg" to draw the player names. To do the utf8 stuff i used the code in "utf8lib.c".
Most playernames are shown the right way as in the game. But when the name is like which is in hex "\xF0\x9F\x98\x83" i don't get the right symbol drawn. I checked the result when calling "getnchar_utf8_enabled", it is 0x0001f603. In the „xolonium-regular.otf“ file it is the right codepoint for the glyph. But how can i draw a WCHAR bigger then 0xffff. So what is the trick to draw this symbol right? I use DrawTextW(...) to do the itemdrawing in my listview.