not-jan/apex-tux

Non-ASCII chars on oled screen

Opened this issue · 3 comments

Non ASCII chars are displayed as ? on the oled screen.
Is it possible to show utf8 chars ? If not maybe map accentuated chars to ASCII (as is commonly done with url slugiffy functions) ?
Can you work on it ?

Hi,
the font comes from https://crates.io/crates/embedded-text and is defined here: https://github.com/not-jan/apex-tux/blob/master/src/render/text.rs#L166

It's probably a non-trivial fix and I'm very short on time at the moment :(

Do I understand it well: text to draw is in self.text ? So a quick fix could be to change accentuated chars to their counter parts ? (é as e, à as a) etc. Am I right ?

That would be one way to fix it, another would be to simply replace the font with an iso_8859_1 variant. This would probably be the easiest fix for you but not something I can merge into the master branch.