Menu

#210 Support for higher Unicode characters (under 16-bit wchar_t platforms, such as Windows)

v0.9.26
open
nobody
None
9
2021-11-04
2021-11-04
No

Tux Paint uses wchar_t internally for a lot of strings. On Windows, this is a 16-bit type, which means Unicode characters above U+FFFF will not work. (Shin-ichi noted a compile-time warning about "comparison is always true due to limited range of data type" when our render_text_w() converts the contents of wchar_t * str to UTF-8, to send to SDL_Pango.)

Things like mathematical symbols (U+01D538 "𝔸", MATHEMATICAL DOUBLE-STRUCK CAPITAL A) and emojis (U+1F631 "😱", FACE SCREAMING IN FEAR) live up here.

Additionally, the internal use of wchar_t appears to extend to how we store Label tool strings within Tux Paint save files, meaning they may not be compatible between platforms that have different sizes for that type.

Note, however, that a lot of places still use SDL_ttf for rendering text, and they are all limited to 16-bit as well.

Discussion


Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.