Hi all, i'm a news here...
Howto use the Class Font with caracters over code ascii 127 (éàùèç..) ?
Is possible ?
I'm a French man lol
sample :
gui::IGUIFont* font = Device->getGUIEnvironment()->getFont("fonts/fontcourier.bmp");
core::stringw buf;
buf="Il était une fois un joli monde àéùçè";
....
font->draw(buf.c_str(), abc.",core::rect<s32>(130,10,300,50),video::SColor(255,255,255,255));
result on my screen
Il []tait une fois un joli monde [][][][][]
[] is the caracter in position 127 in the bmp file fontcourier.bmp
thank you in advance for your answers...[/b]
accentuated characters (over Ascii 127 ) ?
It works fine. Your problem is that you are not supplying a wide string to the stringw assignment operator. You need to do this... [pay special attention to the L in front of the quotes]
Code: Select all
core::stringw buf;
buf=L"Il était une fois un joli monde àéùçè";
....
font->draw(buf.c_str(),core::rect<s32>(130,10,300,50),video::SColor(255,255,255,255));
-
Guest