ThingPulse / esp8266-oled-ssd1306

Driver for the SSD1306 and SH1106 based 128x64, 128x32, 64x48 pixel OLED display running on ESP8266/ESP32
https://thingpulse.com
Other
1.98k stars 638 forks source link

Huge font size - possible? #402

Open mister-Monk opened 3 months ago

mister-Monk commented 3 months ago

I need to show two numbers on the display as large as possible. Ideally 64 pixels character height. I chose the Open_Sans_Hebrew_Condensed font http://oleddisplay.squix.ch/ I'm guessing size 80 is perfect for this. But starting from size 63, the screen does not draw the number 4. And size 80 draws only the edge of the character. In the editor, I moved all the characters to the left by three pixels. Now only number 1 is drawn in full. Only two or three digits need to be displayed. Not enough buffer size? What to do? ESP8266, SSD1306 I2C, latest library. image

nickbits1024 commented 1 month ago

the library needs to be modified to work with 16 bit values instead of chars. notice in the generated font array that some of the values are >255

mister-Monk commented 1 month ago

Wonderful! I will try to study this issue. But bowing my head before the author’s skill, I still ask him to guide me on the right path!

nickbits1024 commented 1 month ago

If you switch to a <3.0 version and format, it works as-is. Also, somewhat related the font creator crashes (500 server error) with the new format (and Adafruit GFX) with sizes >80ish. <3.0 works.

nickbits1024 commented 1 month ago

If you want to fix the drawing routine for the new version all that needs to be done is change the generated font from char to short/int16_t as well as all the local vars in the drawing routines.

mister-Monk commented 1 month ago

As Shakespeare said, "This is Greek to me." I'll try to do this...

marcelstoer commented 1 month ago

@nickbits1024 @mister-Monk just pay attention to the overall memory consumption.