Hello Mathias,

1. You have to use unicode (either directly or in UTF8 encoding) for  
the special characters:

std::vector<std::wstring> lines;
lines.push_back(L"Taste dr\u00fccken");

(direct unicode) - mind the L before the string constant, this is  
*not* a typo! Or:

std::vector<std::string> lines;
lines.push_back("Taste dr\xc3\xbc""cken");

  (UTF8 encoding) - the two quotes prevent the compiler from treating  
the following 'c' as part of the hex escape sequence.

2. The texture that contains the characters by default just contains  
the printable ASCII characters between 0 and 127. You have to tell  
OpenSG which characters you actually need when you create the face.  
For example, the following code adds the german upper- and lowercase  
umlauts and the sz ligature:

OSG::TextTXFParam txfParam;
std::wstring characters = txfParam.getCharacters();
characters += L"\u00c4\u00d6\u00dc\u00e4\u00f6\u00fc\u00df";
txfParam.setCharacters(characters);
OSG::TextTXFFace *face = OSG::TextTXFFace::create("SANS",  
OSG::TextFace::STYLE_PLAIN, txfParam);

Again, mind the L before the string constant.

Bye,

Patrick


-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Opensg-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensg-users

Reply via email to