Custom Smaller Fonts for SSD1306
Posted: Fri May 10, 2019 8:06 pm
Hi all:
I'm currently working in an UI for a glucose sensor, so I need to display the collected data in a small graph (e.g bars, points in time, etc) with an 128x64 display. I have no issues using the frambuf and ssd1306 modules to create simple lines and shapes in the display, but using smaller fonts it's what its driving me crazy.
I've allready used @pythoncoder approach for using custom fonts with writer_minimal.py and it's amazing, but the Limitations section suggest to use hand-made binary fonts with fonts smaller than the default 8x8 from the SSD1306.
The font I came up with is a 4x5 or 3x5 font with the 0-9 chars.
e.g. (BBCode is OFF)
1 1 1 0
1 0 1 0
1 0 1 0
1 0 1 0
1 1 1 0
- How could I create the binary file for those numbers?
- Or Should I use framebuf functions to create every line and/or pixel for each number?
I'm currently working in an UI for a glucose sensor, so I need to display the collected data in a small graph (e.g bars, points in time, etc) with an 128x64 display. I have no issues using the frambuf and ssd1306 modules to create simple lines and shapes in the display, but using smaller fonts it's what its driving me crazy.
I've allready used @pythoncoder approach for using custom fonts with writer_minimal.py and it's amazing, but the Limitations section suggest to use hand-made binary fonts with fonts smaller than the default 8x8 from the SSD1306.
The font I came up with is a 4x5 or 3x5 font with the 0-9 chars.
e.g. (BBCode is OFF)
1 1 1 0
1 0 1 0
1 0 1 0
1 0 1 0
1 1 1 0
- How could I create the binary file for those numbers?
- Or Should I use framebuf functions to create every line and/or pixel for each number?