Hi Sherman,
Have a look at the osgText::String class, there are couple of options
for passing in various non ascii characters sets.
Robert.
On 1/24/07, sherman wilcox <[EMAIL PROTECTED]> wrote:
I'm hoping someone can anwser a unicode/OSG question. I'm trying to display
Korean text using the osgHUD example. I'm using Visual C++ 8.0 (ie visual
studio 2005). Here's what I did:
1) osghud.cpp: added #include <tchar.h>
2) in osg::Node* createHUD () I modified the block that contains
text->setText( "Head Up Displays are simple :-)"); to read:
{
osgText::Text* text = new osgText::Text;
geode->addDrawable( text );
text ->setFont(timesFont);
text ->setPosition(position);
typedef std::basic_string <_TCHAR> tstring;
//서울 == Seoul
tstring unicode_str = _TEXT("서울");
wchar_t *unicode_wchar = _TEXT("서울" );
text->setText(unicode_str .c_str()); //this doesn't work
//text->setText(unicode_wchar); //neither does this
position += delta;
}
3) I added _UNICODE to the preprocessor definition list and I set the
"Character Set" under configuration properties to Unicode.
What I get is two small squares on screen where the korean language symbols
should be.
Ideas?
_______________________________________________
osg-users mailing list
[email protected]
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/
_______________________________________________
osg-users mailing list
[email protected]
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/