FrameBuffer Custom Symbol

General discussions and questions abound development of code with MicroPython that is not hardware specific.
Target audience: MicroPython Users.
Post Reply
User avatar
rdagger
Posts: 143
Joined: Tue Feb 28, 2017 6:16 pm
Contact:

FrameBuffer Custom Symbol

Post by rdagger » Mon Oct 23, 2017 8:18 pm

I'm working with the ssd1306 class which uses the framebuffer class to write text to the display. The framebuffer.text() method appears to only support the ASCII characters between 0x20 and 0x7e (dec. 32 - 126)

Is there any way to add custom characters such as a degree symbol?

User avatar
Roberthh
Posts: 3667
Joined: Sat May 09, 2015 4:13 pm
Location: Rhineland, Europe

Re: FrameBuffer Custom Symbol

Post by Roberthh » Tue Oct 24, 2017 5:14 am

@pythoncoder has written a library to use arbitrary fonts. You'll find it in this forum. I assume he will give you a hint, once he reads this post. But just to add one character, this may be a little overdone.

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

Re: FrameBuffer Custom Symbol

Post by pythoncoder » Tue Oct 24, 2017 11:23 am

See https://github.com/peterhinch/micropyth ... -to-py.git for a means of converting industry standard font files to Python source (which may be frozen to save RAM). Also https://github.com/peterhinch/micropyth ... /README.md for a way to use these with the SSD1306.
Peter Hinch
Index to my micropython libraries.

User avatar
rdagger
Posts: 143
Joined: Tue Feb 28, 2017 6:16 pm
Contact:

Re: FrameBuffer Custom Symbol

Post by rdagger » Tue Oct 24, 2017 7:07 pm

That looks great! Thanks for the excellent documentation.

Post Reply