Most recent activity
-
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 considerdecodeUtf8
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.
-
Greetings from Russia! My device has finally arrived and I'm having a lot of fun with it.
One immediate issue that I noticed is lack of Unicode support for notifications. It's understandable that full Unicode character set is infeasible (both support and fonts). However, there are also known local character sets, like ISO8859-5, CP1251 or KOI8-R for Russian.
I was wondering how complex would it be to:
- Replace font in Messages with one containing Russian letters on expected code points for one of the encodings above;
- Add Gadgetbridge support to encode strings as expected.
Where should I start with this on BangleJS side? Can I somehow make font in Messages customizable and configurable from app store? Ideally one would upload a desired font separately (or just use the system one), and then select needed encoding in Gadgetbridge settings.
- Replace font in Messages with one containing Russian letters on expected code points for one of the encodings above;
Interesting - I expected it to do just that.
Wow, I completely missed it! This does exactly what I need. We could mention it in https://www.espruino.com/Fonts#character-sets -- I didn't expect that kind of function in
E
.Makes sense, yeah. I'm still worried about performance, but we could measure it and think of improvements afterwards. One possible way would be to implement some sort of on-device LRU cache for glyphs which is managed from Gadgetbridge side.
I'll see if I can make something work.