Create an account


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
using the Xolonium font

#1
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 Shy 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.
Reply

#2
This has not much to do with the font.

AFAIK, wchar is expected to be UTF-16 encoded.
In that case, characters beyond U+FFFF require two 16-bit code units.
See: https://en.wikipedia.org/wiki/UTF-16#U.2...U.2B10FFFF

Example character:
Unicode: 1F603
UTF-8: F0 9F 98 83
UTF-16: D83D DE03
Reply

#3
Thank you very much! This was the solution, it works now.
Reply

#4
I don't know what exactly your query tool is supposed to do, but I recently started a Xonotic launcher app (http://forums.xonotic.org/showthread.php?tid=6057) which queries the dp-masterserver for a server list. Depending on your goals, maybe we can join these two projects.

Let me know if you're interested
Reply

#5
@Freddy

thx for your offer. My proggy is a dll plugin for Firefox. It is based on this code:

https://sourceforge.net/projects/q3plug/

or here

http://members.liwest.at/mb/q3plug/

I only added some code to show Xonotic servers. So the only improvements i did, was the name color drawing for xonotic, the rest was more or less allready in the code. So i think its not enough to join with your project, but thx anyway.
Reply



Possibly Related Threads…
Thread Author Replies Views Last Post
  Remove color font from scoreboard and drag notify, but not chat Molnija 6 5,840 09-14-2018, 10:28 PM
Last Post: Molnija
  Font - Ubuntu JoeMaro 13 11,234 04-24-2015, 02:34 PM
Last Post: BuddyFriendGuy
  [Script] Full realtime world lighting, using static light entities MirceaKitsune 4 6,671 03-23-2015, 12:33 PM
Last Post: Lee_Stricklin
  [plan] A single-player game creation toolkit using the Xonotic framework MirceaKitsune 21 32,485 06-18-2013, 10:15 AM
Last Post: Zeo
  Xonotic new font zeroql 21 22,004 08-19-2012, 08:55 AM
Last Post: machine!
Information [MUST SEE!] Using Pirate Pad to democratically decide on ideas Samual 4 9,973 11-06-2010, 06:12 PM
Last Post: Rage_ATWM

Forum Jump:


Users browsing this thread:
1 Guest(s)

Forum software by © MyBB original theme © iAndrew 2016, remixed by -z-