Text characters in BGE

Hi. I want to write a dynamical text in my games in Czech language. But i am not able to write some characters of Czech language. The characters I need are: č, Č, ů, ř, Ř, Ď, ň, Ň, š, š, Ť, ž, Ž. I don´t want to make textures for all text in my game.
Can anyone help me, please?

REiKo Rhoemer,

I wrote a tutorial long time ago, hope it’ll help you.

Because I’m not satisfied with ftblender application, I’m preparing new tool that will automatically generate bitmap texture with selected characters, load it to Blender and make proper UV mapping.

Thanks, ashid. I read your tutorial and understand the solution. Your demo blend file wasnt working properly in my Blender 2.45 (and if i did all the procedure for myself, it wasnt working properly either), but I got the idea. If I convert font with your tools in tga file and switch some (for my purpose) usefull characters like ć for č with some editor. Then I should got č if I write ć in Blender, right?
P.S.: It is funny ,that Czech and Slovak are speaking English with each other ;).

REiKo Rhoemer,

I did a few tests and looked into Blender sources and found a bug, that allows to show only basic ASCII characters (0x20 - 0x7F). If the bug will be corrected, it will allow to show characters in range (0x20 - 0xFF).

It’s a sad situation, because bitmap fonts are currently unusable for texts with diacritics.

There is one possible workaround - use PIL to render text to image and then my blendVideoTex plug-in to load image into texture. This way you should be able to show any unicode string in GameBlender.

And I try to report bug to tracker and hope that it will be corrected in the next version.

Well, I succeded to find workaround that works. I’ll look at it closely and update existing script makeFont.py to make it compatible with Blender 2.45.

P.S. Hej, skús www.blender3d.cz/forum, tam si pokecáme v rodných jazykoch.

I uploaded updated tool and demo, now that works on Blender 2.45 well.

Blender was able to show characters in range 0x20 - 0xFF - it uses char type for strings. My tool mapped unicode characters in bitmap font texture to char type (for Easter Europe windows code page 1250). But in newer versions of Blender was font rendering changed to render any UCS2 unicode character (uses unsigned short for character representation). Blender strings are still char, so it doesn’t use unicode possibilities.

Now the bug: conversion from Blender string to unicode character is: (signed) char -> (signed) short -> unsigned short. If you use character >= 0x80 (for example ‘§’ = 0xA7), conversion takes it as negative value and renderer looks for values in range 0xFF80 - 0xFFFF (so ‘§’ is represented by 0xFFA7).
My correction modifies tool so it shifts codes >= 0x80 in bitmap font texture to required range. Thats all.

Thanks for help, Ashid. It works excellent now. I hope that Blender developers will correct the bug soon.