rust-embedded-community / ssd1306

SSD1306 OLED driver
Apache License 2.0
283 stars 69 forks source link

Inconsistent Uppercase Font in Terminal Mode #135

Closed Tenebryo closed 3 years ago

Tenebryo commented 3 years ago

Description of the problem/feature request/other

Several uppercase characters in terminal mode are bold, inconsistent with the rest. The characters in question are DLORW, which use 2-3 pixel font instead of 1 pixel like the rest of the characters.

Example code and result:

let interface = I2CDIBuilder::new().init(i2c);
let mut disp: TerminalMode<_> = Builder::new().connect(interface).into();

disp.init().unwrap();

disp.clear().unwrap();

for c in "!\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|".chars() {
    disp.print_char(c);
}

oled_font

jamwaffles commented 3 years ago

In a sense this is by design; the font used renders those characters that way but I do agree it looks strange. We could certainly switch to a different font that's more consistent though. @therealprof wrote the initial terminalmode impl, so he might have a reason the current font was chosen. Font suggestions are welcome. I'd be happy to write a lil conversion script for one of the fonts in embedded-graphics if there's no other preference.

therealprof commented 3 years ago

No specific reason why I picked this font. Happy to see it replaced by a better one. Do we have a nice 7x7 (or smaller) font somewhere?

jamwaffles commented 3 years ago

I've switched to a new font which looks like this:

This will go out in the next release.

jamwaffles commented 3 years ago

Released in 0.4.1.