Wish: complex script support

One of the declared goals of EasyRPG is…

Which is very cool. We already have Unicode support (using Encoding=65001 or XML; although there’s no ready-made way to edit such maps).

But currently we only support the simplest scripts where 1 Unicode codepoint = 1 character. However, to support more characters, we need:
[li] combining characters and positional variants (Arabic, Indic scripts),[/li]
[li] right-to-left writing (Herbew, Arabic),[/li]
[li] vertical writing (vertical LRT for Mongolian and related scripts; vertical RTL might be used as an option for Chinese and Japanese).[/li][/ul]

I don’t know how this should be handled, but it would be nice to think about these features.

I’m not sure if fixed-width font works well for all the languages. We may need to use a variable-width fonts for these languages. But if we have variable-width font, the current ‘Show Message’ function is definitely not very useful: maybe we need an ‘advanced show message’ which re-flows the text and takes bidirectionality into account.

RTL and vertical writing definitely requires re-thinking the whole interface.

We could use Pango (LGPL) to bring these features with ease. Pango can still use FreeType in a lower layer.

This will solve only the first problem, namely complex script support. Also, I’m not even sure it will solve it: is Pango available for Android? Are there fonts clear enough to be read in 320*240 for most scripts?

For RTL support we need to mirror the menus. Here’s a fake screenshot in Uyghur (I neither speak Uyghur nor write it, so Uyghur speakers please excuse me!), which can be written in Cyrillic and in Arabic scripts:

It will get even more complex for vertical scripts, because width ≠ height.

For the font issue to get higher quality I guess a long term solution is rendering in 640x480 instead of 320x240. That’s 4-times the pixel (and upscaling all images… in the same turn we could add “hires” image support)

Which also means to refactor the Draw API. At the moment every Drawable draws directly on the screen. Makes such hacks like “rescape this but not that” hard ^^

I wonder if I can add some positional forms to a private-use area of Unicode in Shinonome, and then make changes to the font display code so that it replaces Unicode codepoints with the positional glyphs in PUA.

Fun fact: vertical writing doesn’t require* bidirectional text.

  • When we consider living languages. Oghamic Irish would need a bidi, as Ogham was written from top to down.