Using ssd1306 with larger fonts - a solution

RP2040 based microcontroller boards running MicroPython.
Target audience: MicroPython users with an RP2040 boards.
This does not include conventional Linux-based Raspberry Pi boards.
Post Reply
John57
Posts: 10
Joined: Sat Mar 06, 2021 5:26 am

Using ssd1306 with larger fonts - a solution

Post by John57 » Thu Mar 18, 2021 8:25 am

Hello,

Info that may be useful.

I have just interfaced a ssd1306 to the pico and is working well. However the distributed ssd1306 only supports a fixed small 8x8 pixel font. Which is small and indistinct on such a screen.

I came across a project (https://github.com/mchobby/freetype-generator.git) that creates compact pixel format files at user defined sizes from ttf fonts. Also included is a micropython class that writes text strings into the displaybuffer using one of those fonts. The pixel files are created on a full python machine (a few are supplied pre-formatted) and copied along with the upython module onto the micropython device. A 23 high pixel veramono font is only 3.5kb.

Cheers

User avatar
pythoncoder
Posts: 5956
Joined: Fri Jul 18, 2014 8:01 am
Location: UK
Contact:

Re: Using ssd1306 with larger fonts - a solution

Post by pythoncoder » Thu Mar 18, 2021 1:04 pm

See font-to-py which can store fonts in flash, reducing RAM usage by an order of magnitude.
Peter Hinch
Index to my micropython libraries.

Post Reply