Interesting approach! This could allow us to show any Unicode codepoint, not only a limited set.
I went into another approach, which is to store localized fonts in the device's memory and decode UTF-8 to them according to charmaps. This potentially doesn't require any changes in Gadgetbridge at all. Another benefit is (admittedly, not measured) performance gain from sending strings instead of bitmaps over BLE (especially for long localized messages).
This, however, requires user to upload a special font and a charmap together into the device. Can we in theory package them together as some sort of "font" in the app store, and then select and use this "font" in Messages?
I have a prototype working here: https://github.com/abbradar/banglejs-ru . It also requires a patched Font Converter, which can create fonts according to a charmap : https://github.com/abbradar/EspruinoDocs (pre-compiled HTML at https://abbradar.moe/me/banglejs-font.html ). I consider Font Converter code ready to make a PR if you agree that this can be useful.
One small issue is performance of conversion from Uint8Array to String here: https://github.com/abbradar/banglejs-ru/blob/ffb62e592e63dd1f3a826480789e9f56138a0717/decode.js#L133 We don't have
TextEncoder implemented, but is there any better way? Otherwise I consider
decodeUtf8 performance to be good enough for notification messages.
What do you think about this approach in general? Should I try integrating this with Messages? We could also use hybrid approach: support local alphabets as fonts and show other symbols (emoji!) as inline bitmaps.