apex-tux icon indicating copy to clipboard operation
apex-tux copied to clipboard

Non-ASCII chars on oled screen

Open Thomas-git opened this issue 3 years ago • 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 ?

Thomas-git avatar Feb 09 '22 10:02 Thomas-git

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 :(

not-jan avatar Feb 11 '22 11:02 not-jan

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 ?

Thomas-git avatar Feb 24 '22 09:02 Thomas-git

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.

not-jan avatar Feb 24 '22 09:02 not-jan