How to draw CJK/Unicode fonts?

Previous topic - Next topic

Youkaisan

Hi,

I'm looking for a simpler way to use CJK/Unicode fonts in my game, but  after lookingh at the Hangul example, I found it's not that easy, for example, the Japanese character contains kana and kanji, which is thousands of words than just a few symbol of Hangul, or Chinese contains even more characters.

As I know some system are Unicode based now like Mac/Linux/Android, however GLBasic uses Ansi character, is there any way to do this?

Paid solution is OK, but i can't find one yet.

spacefractal

#1
no, its not possible, this is a highly missing feature. The reason is simply strings in glbasic is just 8 bit. Here BlitzMax is much better to do that about font support (BlitzMax uses 16bit strings).

But mightbeen its possible to uses POLYVECTOR to do semi unicode based on a UTF8 string, which could convert the string to unicode bytes, and then point to a contain area on a texture. But memory is quite limited when dealing with bitmap graphics, so you are property limited to do around 4096 letters (example using a 2048x2048 texture with each letter is 32x32 pixels big).

Genius.Greedy Mouse - Karma Miwa - Spot Race - CatchOut - PowerUp Elevation - The beagle Jam - Cave Heroes 2023 - https://spacefractal.itch.io/