Currently unicode_page_**.bin font files won't work, because their codepoint tables contain their actual unicode codepoints (e.g. unicode_page_53.bin declares that it contains glyphs from 5300 to 53FF), but CC-Tweaked's Lua backend always decodes the Lua string into 8-bit characters (0000 - 00FF) only, which means the non-ASCII characters will be split into multiple individual characters and never hit any of their codepoints.
I suggest two ways of fixing this:
The first would be,
Add a new drawTextUTF8 method, which converts the given String into a byte array, decode the byte array with UTF-8 and do the same as drawText method.
Merge unicode_page_**.bin into one single file.
The second would be,
Keep the unicode_page_**.bin files unmerged, but remap every codepoint maps into 0000 - 00FF.
Users can then write a Lua function theirselves to parse the UTF-8 string, where they switch to the font according to the high word of one Unicode character and draw the low word as an 8-bit character.
Currently
unicode_page_**.bin
font files won't work, because their codepoint tables contain their actual unicode codepoints (e.g.unicode_page_53.bin
declares that it contains glyphs from5300
to53FF
), but CC-Tweaked's Lua backend always decodes the Lua string into 8-bit characters (0000
-00FF
) only, which means the non-ASCII characters will be split into multiple individual characters and never hit any of their codepoints.I suggest two ways of fixing this:
The first would be,
unicode_page_**.bin
into one single file.The second would be,
unicode_page_**.bin
files unmerged, but remap every codepoint maps into0000
-00FF
.