This replaces the switch cases in KeyModifier.java with JSON files, one
for each diacritic.
The number of states increases from 6727 to 7377. The apk size slightly
decreases (around 3kb).
Encoding errors in the compose data compiler due to:
- 'UTF-16' adds a BOM, use 'UTF-16-LE' instead
- 'str.encode' returns a byte array, use 'array' to have a 16-bit char
array.
Parse key names from keysymdef.h, which is distributed with Xorg. The
Greek, Cyrillic and Hebrew sequences referenced these keysyms.
This increases the number of sequences from 2043 to 2668.
Change the compose state machine definition to allow final states that
are wider than 16-bits.
This increases the number of sequences that can be used from
en_US_UTF_8_Compose.pre from 2013 to 2043 (of 3201).
compile.py implements a parser for X11's Compose.pre files. A lot of
code is necessary to interpret character names but thanksfully, the name
of most characters is contained in the file.
The state machine is compiled into two char arrays which unfortunately
requires an expensive initialisation and allocation.
The COMPOSE_PENDING modifier indicate whether a compose sequence is in
progress. The new key of kind Compose_pending sets the current state of
the sequence.
The compose sequences are compiled into a state machine by a python
script into a compact encoding.
The state of the pending compose is determined by the index of a state.