sikthehedgehog / indigo

Indigo operating system
zlib License
57 stars 4 forks source link

Add UTF-8 support #9

Open sikthehedgehog opened 7 years ago

sikthehedgehog commented 7 years ago

Currently Indigo is ASCII-only but I should probably make room for rendering UTF-8 text before I regret it.

Probably the trickiest part here is the OSUI_Ascii pseudo-widget (currently only used by the Terminal). Luckily, this is a new feature (i.e. not stable yet) so backwards compatibility is not a concern. Also we could just extend it to return the whole Unicode codepoint instead of an ASCII value. The big issue in this case is IME-style input. I suppose that multiple characters can be returned as multiple events in the worst case, but what about the cases where it needs to replace the previous character? (e.g. z → з, zh → ж) Send a backspace?

Of course if IME-style input is ever supported we also need a way to have the partial input to be displayed on screen...

sikthehedgehog commented 7 years ago

Messing with extending the font.

Latin Extended: font_00a0 font_00a0_bold

Greek: font_0390 font_0390_bold

Cyrillic: font_0400 font_0400_bold

Hiragana and katakana: font_3000 font_3000_bold

Emoji (ugh): font_1f600 No bold for this one because it looks like trash

sikthehedgehog commented 7 years ago

Marking this as needed for 0.20 because the terminal takes keyboard input and changing this later will result in an ABI mess (I don't want to break backwards compatibility between release even if it's likely pointless). Font support can wait, though.