[SDL] Problem with SDL_ttf and some unciode characters

Benjamin Deutsch ben at fictiongroup.de
Mon Feb 14 09:36:06 PST 2005


Hello,

> It seems that SDL_ttf have some problems to draw some unicode characters with 
> some truetype font.
> For exemple, I ask to showfont (provided with SDL_ttf sources) to draw those 
> UTF8 characters :
> aéŠЯ
> This is 4 characters. There unicode numbers are : 0x61 - 0xe9 - 0x160 - 0x44F
> With 'Arial.ttf' it works perfectly, but with the famous "Vera.ttf" (Bitstream 
> Vera Sans) the last character is not drawn : there is a square instead. 
> I am sure that Vera.ttf has this character (I can use it with kword).

No, the original Bistream Vera does not include that character. Kword 
probably substitutes a different font for Cyrillic characters.

For derivatives of Vera containing Cyrillic characters, try 
http://kvota.net/fonts/ or (the larger) http://dejavu.sourceforge.net/

(Disclaimer: I have not tested these fonts, nor can I verify their 
validity or legality... you should probably look into this yourself.)

Another solution is to open several fonts at once, covering all the code 
points you wish to display.

Hope this helps,
   Benjamin Deutsch




More information about the SDL mailing list