I am currently following lesson 43 of the NeHe lesson ( http://nehe.gamedev.net/data/lessons/lesson.asp?lesson=43 ). The code works satisfactorily only for English text, not Unicoded. Fortunately, I follow the link from the NeHe 43 lesson at http://www.cs.northwestern.edu/~sco590/fonts_tutorial.html and found another identical sample tutorial with only one difference: it uses w_char and the site claims that you You can work in a language other than English.
So I give it a try:
freetype::print(our_font, 320, 200, (unsigned short*)L"Active FreeType Text หกโด้กี่ดุ öáæé おはよ。- %7.2f", cnt1);
the print freetype namespace function has the 4th argument as * const unsigned short **, so I came up with it. I also put L in front of the double quote for long characters and put some Asian characters for testing purposes.
As a result, all the English text can be displayed just fine, but all Thai characters become "[] B [] i [] 5H [] 8". [] - square rectangles. From what I understand, this means that the font does not have the specified language, so I tried other fonts, but all other Thai fonts give the same square squares. For the Japanese font, this is one and the same. All boxes along with some English characters next to them. The substring öáæé turns out to be perfect without any problems.
Did I forget something? How can we display non-English Unicode here?