Open kitenium opened 3 years ago
The DrawString
method uses a custom font that is embedded into the header file - unfortunately, it doesn't non-English characters.
However, Oso-Grande has just created a PGEX which lets you use a custom font with a little bit of work. The PGEX can be found at https://github.com/Oso-Grande/olcPGEX_Font
With this, you should be able to use a font that supports the characters you need.
This is a little more complicated than a custom font. Even with a custom font how do you call DrawString sensibly? Those characters dont lie within English glyph range. In principle a genuine font renderer is required. Some of these exist, and it may be simpler to ask (@MaGetzUb) on the discord server.
Thank you sir for the speedy reply. I will try to see if I can reach him. Have a nice day :)
It turns out youve started a bit of a race on the server to create a Unicode compatible DrawString, so fingers crossed teh awesome community will (as usual) find a solution :D
Wow, so glad to hear that we have such a strong community support for this awesome game engine! Way to go man, way to go!
This may be of some help to get you started. Possibly has a few bugs and definitely has limitations but it's simple to use if you don't need anything special.
This may be of some help to get you started. Possibly has a few bugs and definitely has limitations but it's simple to use if you don't need anything special.
Thanks mate. I'm not in a rush so happy to wait until all the bugs have been ironed out by the awesome people in this strong community but thanks for offering that option :)
You're welcome. Well the bug count is officially zero right now, so, enjoy :)
https://github.com/gorbit99/olcPGEX_TTF Also try this on for a fit. It might require a bit of a preparation in terms of installing libs and such, but it should work for all of unicode.
https://github.com/gorbit99/olcPGEX_TTF Also try this on for a fit. It might require a bit of a preparation in terms of installing libs and such, but it should work for all of unicode.
Thanks gorbit99! Really appreciate the awesome work for the extension. Will try it and report back if I had any feedback to share. You have a great day sir!
It's working beautifully! Thank you @gorbit99 and everyone who helped me here. I feel like I have chosen the right game engine to start with. :)
Trying to draw the text using the following call: DrawString(4, 34, "おはよう123123", olc::BLACK);
But it only showed the numbers, the rest becomes empty.
Could you kindly fix it please?
Love your engine by the way :)