Anybody can give me a Russian font.

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Post Reply
Chmel_Tolstiy
Posts: 41
Joined: Mon Feb 11, 2008 3:06 pm

Anybody can give me a Russian font.

Post by Chmel_Tolstiy »

Help me. I can't create font. When I create it, it doesn't load by engine. May be I do something wrong. But when I create a texture of font, it doesn't contain yellow and red points such as in standart texture (from example) has. Are this points important ?

Thanks to all.
JP
Posts: 4526
Joined: Tue Sep 13, 2005 2:56 pm
Location: UK
Contact:

Post by JP »

Look in the tools folder of the SDK, there's a font tool in there to create .bmp from .ttf
Image Image Image
Chmel_Tolstiy
Posts: 41
Joined: Mon Feb 11, 2008 3:06 pm

Post by Chmel_Tolstiy »

Sorry, but I don't understand what about u say. I used tool for creation font. But this texture not loaded correctly.
MasterGod
Posts: 2061
Joined: Fri May 25, 2007 8:06 pm
Location: Israel
Contact:

Post by MasterGod »

Here's a Russian font created with the tool in the Irrlicht SDK.
Load the .xml file, not the image file.

http://www.upit.ws/uploads/9587c69f47f1b.zip

P.S
Image
Image
Dev State: Abandoned (For now..)
Requirements Analysis Doc: ~87%
UML: ~0.5%
Chmel_Tolstiy
Posts: 41
Joined: Mon Feb 11, 2008 3:06 pm

Post by Chmel_Tolstiy »

MasterGod, thanks
bitplane
Admin
Posts: 3204
Joined: Mon Mar 28, 2005 3:45 am
Location: England
Contact:

Post by bitplane »

A lot of people ask this question, rather than add it to the FAQ I've updated the error message when no dots are found. It now gives the user a hint to load the XML file instead
Submit bugs/patches to the tracker!
Need help right now? Visit the chat room
Chmel_Tolstiy
Posts: 41
Joined: Mon Feb 11, 2008 3:06 pm

Post by Chmel_Tolstiy »

Have some more trouble ...
this line
menu->addItem(stringw(stringc("Слои").c_str()).c_str(), -1, true, true); doesn't work ...
but line
menu->addItem(L"Слои", -1, true, true); works correctly

"Слои" - some russian text :)
Chmel_Tolstiy
Posts: 41
Joined: Mon Feb 11, 2008 3:06 pm

Post by Chmel_Tolstiy »

Question is:
how to convert russian stringc to stringw ???
MasterGod
Posts: 2061
Joined: Fri May 25, 2007 8:06 pm
Location: Israel
Contact:

Post by MasterGod »

Chmel_Tolstiy wrote:Have some more trouble ...
this line
menu->addItem(stringw(stringc("Слои").c_str()).c_str(), -1, true, true); doesn't work ...
but line
menu->addItem(L"Слои", -1, true, true); works correctly

"Слои" - some russian text :)
try maybe:

Code: Select all

stringw(L"Слои").c_str()
Image
Dev State: Abandoned (For now..)
Requirements Analysis Doc: ~87%
UML: ~0.5%
MasterGod
Posts: 2061
Joined: Fri May 25, 2007 8:06 pm
Location: Israel
Contact:

Post by MasterGod »

Chmel_Tolstiy wrote:Question is:
how to convert russian stringc to stringw ???
russian text is Unicode hence cannot be string of c8s (core::stringc) but a string of wchar_t (core::stringw).
Image
Dev State: Abandoned (For now..)
Requirements Analysis Doc: ~87%
UML: ~0.5%
Chmel_Tolstiy
Posts: 41
Joined: Mon Feb 11, 2008 3:06 pm

Post by Chmel_Tolstiy »

MasterGod wrote:
Chmel_Tolstiy wrote:Question is:
how to convert russian stringc to stringw ???
russian text is Unicode hence cannot be string of c8s (core::stringc) but a string of wchar_t (core::stringw).
strange ... I can save russian text in std::string ... but what I need to do if file contain a russian text in ASCII code ? Any ideas ?
greenya
Posts: 1012
Joined: Sun Jan 21, 2007 1:46 pm
Location: Ukraine
Contact:

Post by greenya »

Maybe this can help -- http://irrlicht.at.ua/publ/1-1-0-5 -- an article on Russian how to use Cyrillic in Irrlicht.
Chmel_Tolstiy
Posts: 41
Joined: Mon Feb 11, 2008 3:06 pm

Post by Chmel_Tolstiy »

I wrote my own convert function ... that find russian letters in irr::core::stringc and replace it with wchar_t letter to irr::core::stringw ... any other simbols stay without change.

May be exist simpler way to convert strings ?
lester
Posts: 86
Joined: Mon Jan 29, 2007 3:33 pm

Post by lester »

Chmel_Tolstiy

As for converting, there is a function mbstowcs or similar, lurk through the docs.

З.Ы. а вообще юзай биндинг к freetype от zgock'а и не ипи моск
Post Reply