-
• #2
Is it possible to render UTF-8 characters (Kanji)?
-
• #3
Not sure, but you can try to build a Kanji bitmap font, check section custom-fonts.
-
• #4
Is it possible to render UTF-8 characters (Kanji)?
Right now you only have native support for simple 8 bit character encoding, and that's handled in the 6x8 font as ISO10646-1 (chars 0-255 of UTF-16) - Vector and 4x6 fonts use just ASCII (chats 0-127).
Unfortunately the limit is really the amount of memory available - there just isn't the flash to build in >256 chars of fonts.
The simplest way would be to create your own font that used an 8 bit Japanese codepage too, like https://en.wikipedia.org/wiki/JIS_X_0201 - but it sounds like that's not really complex enough for modern use.
But... Nothing actually stops you from storing a proper (>8 bit) character map in flash and rendering from there with
g.drawImage
- you could then write your owndrawString
implementation that would work with UTF-8.It depends what you're after though - if you're trying to render text that comes from a phone or PC it's probably much easier and better (maybe even antialiased) to render on the host device and send a bitmap over.
App Loader offers an app called
Languages
. This is customizable and gives you the choice to upload country specific settings, which are called locales. Take a look at local planet page eg en_GBBy customizing means: Select a locale like
de_DE
and click on Upload. Now you have stored the information on your Bangle.js.Keep in mind that only the 6x8 font can handle char values > 127.
The app
Settings
is using thislocale
to translate some words into you language , see attached pictures.Existing translation set:
That allows to display
Yes
as meaning in you local likeJa
and so on.Code snippet
Or get the day and month name in the local language
Code snippet
Snippet with all possible function for
locale
Hope you now have an idea what this app can be used for and you start adding locales to your apps.
If your language is missing or has typos, please create issues or pull request on github.
2 Attachments