adafruit / Adafruit-GFX-Library

Adafruit GFX graphics core Arduino library, this is the 'core' class that all our other graphics libraries derive from
https://learn.adafruit.com/adafruit-gfx-graphics-library
Other
2.38k stars 1.54k forks source link

rendering Katakana, Hiragana and Japanese Kanji characters #162

Closed matphillips closed 6 years ago

matphillips commented 6 years ago

I'm trying to output the full range of Japanese characters to a HUB75 display connected to an ESP32 with no success.

The included font package seems not to include them and from reading the source code for the custom font converter, it seems that this may not be possible.

Is there any way to use this library in this way?

pljakobs commented 6 years ago

the current implementation supports only 7 bit ascii. There are two issues I see for Japanese characters: one is their sheer number and complexity that will require tons of memory for only a single font the second is that implementing them would require extended unicode handling, which currently isn't implemented and probably very difficult to do. I have, for a very long time, had the plan to implement an ISO-8859 mapping mechanism for extended and non-latin character sets, but frankly not had the time and support to do it.

matphillips commented 6 years ago

Thanks for the reply, good to get confirmation that it's not supported.

You're completely correct about the font file size, but I was hoping the glyphs could be loaded from spiffs as needed or something. Trying to generate a "word of the day" style learning tool to show random words changing each hour, so speed isn't an issue.

I'll keep looking for a solution, thanks!

pljakobs commented 6 years ago

we don't support loading fonts from spiffs, the core focus of this library is the Arduino platform as a whole. It has to work from a humble Atmel 8-Bit all the way to ESPs and ARM cores.

hikari-no-yume commented 4 years ago

In case someone in future is wondering about Japanese with this library.

While it does sound like full Japanese script support is out of scope, I want to point out that there are single-byte character sets for Japanese containing just half-width Katakana (JIS X 0201) and a variant of ASCII (more accurately ISO 646) which are commonly used on dot matrix LCDs (in fact it's sometimes the default character set). I imagine that is something this library could reasonably support?