Hello Xavier,
Hello,
I can't figure out how to use the System/Text to display utf8 text
(under Fedora)
In the OSGTextTXFFace there is this method:
/**
* Lays out one line of text.
* @param utf8Text The UTF8 encoded text.
* @param param Contains parameters that affect the layout process.
* @param result Gets filled with the layout results.
*/
virtual void layout(const std::string &utf8Text,
const TextLayoutParam ¶m,
TextLayoutResult &result);
-----------
i have tried to change my LC_ALL and other LC_ but nothing is
displayed...
Did someone try the text module with utf8 ?
Yes, of course (it's my code ;-)
First of all, you have to make sure that your text is actually UTF8
encoded. That has nothing to do with any environment variables like
LC_ALL. You simply need a text editor that is able to create UTF8
encoded text.
Second, you have to make sure that the TXF face actually contains the
characters that you want to display. By default, TXF faces only
contain printable ASCII characters, no french or german characters.
You can tell the system which letters to integrate into the texture
when you create the TXF face:
TextTXFParam param;
param.setCharacters("abc");
TextTXFFace *newFace = TextTXFFace::create(family, style, param);
This example creates a TXF face that just contains the lowercase
characters a, b and c. In your case, you have to set the characters
that you actually need for your text. Keep in mind that the
setCharacter methods again takes an UTF8 string!
Hope this solves your problem,
Patrick
-------------------------------------------------------
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server.
Download it for free - -and be entered to win a 42" plasma tv or your very
own Sony(tm)PSP. Click here to play: http://sourceforge.net/geronimo.php
_______________________________________________
Opensg-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensg-users