Change text size on OLED display 128x64
-
Hello,
Is there any way to change the text size on a OLED display 128x64 ?
I am working with a Wipy 3.0 and and Oled display 128x64. At the moment I can display texts on the display without any problem, but I would like to change the text size. The ssd1306 module that I am using does not support any parameter to change the font size.
This the ssd1306 that I am using:
https://github.com/adafruit/micropython-adafruit-ssd1306Any help (code) would be appreciated.
-
@robert-hh Ok. I will do it.
Thanks.
-
@marcosidialgmx I no not know whther the firmware update will not solve that. If I compare the blit documentation with PyCom's implementation (Pycom does not document frambuf), it looks equivalent. What error do you get?
Edit: There were changes in Nov 2018, so updating to 1.18.2 is definitely useful. For other reasons too.
-
@robert-hh Thanks. I took a look and it's a great works by Peter Hinch.
I tried to test the code, but I get errors with the following framebuf methods: blit(), line(), vline(), and hline().
I am using a Wipy 3, version='v1.8.6', release='1.7.0.b1'
Could a firmware upgrade (wipy v1.18.2) solve the problem with the framebuf methods?
-
This post is deleted!
-
@marcosidialgmx Peter Hinch has made a lot of work in transposing standard font in data formats which can be used by a microython device. https://github.com/peterhinch/micropython-font-to-py
That consists of two parts:- a font converter, which converts a ttf or otf font file into a python script. That one would run on a PC
- a writer class, which writes a Python-coded font to a display, using the framebuf class. Since this is written for a different variant of MicroPython, you may have to adapt that a little bit. Mostly for the constants used by the framebuf class.