Topic: Non-english text (e.g. russian) support

I planning to use Maratis for my game. My language is not english.
When I try use national simbols then TEXT (object) is not display nearly correctly (one simbol ё is wrong).
I analized source-code, make some fix and now TEXT appears correct.

// MFreetypeLoader.cpp

bool M_loadFont(const char * filename, void * data)
{
    ...
    error = FT_Load_Char(face, n, FT_LOAD_RENDER); 
    // replace twice to
    error = FT_Load_Char(face, (n < 192) ? n : n + 1040 - 192, FT_LOAD_RENDER);  
    // My national symbols (russian) begin from 1040 position in unicode. First 192 symbols are common. 
    ...
}

http://sgeproject.narod.ru/pics/Maratis/font.jpg

So, I see two ways to support non-english languages

  1. build font by user-defined alphabet

  2. add new option "language" for define start position of national symbols

It's just remark for thinking, not request smile
I'm not professional C++ engineer (=> My C++ is very weak) and gamedev is my hobby.
So you can find more elegance way to support other language.

Re: Non-english text (e.g. russian) support

Hi, thank you for the tip,

I started adding real unicode support in the experimental branch,
so I'll also try to check that to be sure the symbols are loaded by lib freetype.

Re: Non-english text (e.g. russian) support

anael, I think, unicode is not drug. The font creates as texture and font with all unicode symbols is bad.
Maybe use first way? User define own alphabet in option as string, e.g. "ABC...abc..." and when texture created then only user sympols apears there.