|
From: | Vincent Caron |
Subject: | Re: [Devel] Problem with special characters |
Date: | Wed, 22 Jan 2003 12:09:42 +0100 |
User-agent: | Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.2.1) Gecko/20021226 Debian/1.2.1-9 |
José Carlos García Rufino wrote:
How can I use freetype2 for rendering specials characters as áéíóúÁÉÍÓÚñÑ?I use arial.ttf font and windows 2000pro I'm able to rendering the others characters, but those specials characters don't work right.The rendering result of those characters is a white mark.I use 256 gray-scale rendering
This font file has a Unicode charmap, and FreeType will automatically select it upon loading. It means that for instance FT_Load_Char() will expect a Unicode input. Most Windows use their own charmaps (named 'Code Page'), which do not exactly match the first 256 codes (00 - FF) of Unicode (the characters you're looking for are mostly in these lower numbers of the huge Unicode map). You have to figure out the charset used by the subsystem which provides your characters and eventually do a conversion : for instance the charcode sent by a Windows keypress message uses Window's current code page. Have a look at MultiByteToWideChar in MSDN, it will do the trick.
[Prev in Thread] | Current Thread | [Next in Thread] |