Re: Suggested standard approach to font handling
Posted: Wed Aug 29, 2018 6:58 am
Thank you for reporting your results and for supplying the full cyrillic character set. I appreciate cyrillic_subset lacked the full charset. It was just a demo. I've updated it with the charset you supplied and renamed it cyrillic.
RAM on the ESP8266 is a problem and larger files need to be frozen as bytecode. That's one reason why I retained writer_minimal.py - perhaps I should clarify this in the docs. This file is the old version with redundant example code removed.
Reasons for the changes to writer.py:
The Writer class was originally intended as a proof of concept for font conversion: I anticipated people using it as a template for writing drivers targeted at specific display devices. But it acquired a number of users with SSD1306 devices. Further, the framebuf class acquired the ability to be subclassed and the official SSD1306 driver was adapted to do this. The ability to write display drivers subclassed on framebuf opened up the possibility of Writer becoming generic and usable with any display, colour or monochrome, with such a driver.
Users requested a number of improvements to the Writer class such as support for multiple displays, word wrapping and upside-down display. I have also implemented support for colour displays. All of this has increased the size.
Writer is now generic. In addition to SSD1306 it works with Nokia 5110 using this driver and this Adafruit colour display (driver for the latter to be posted soon).
RAM on the ESP8266 is a problem and larger files need to be frozen as bytecode. That's one reason why I retained writer_minimal.py - perhaps I should clarify this in the docs. This file is the old version with redundant example code removed.
Reasons for the changes to writer.py:
The Writer class was originally intended as a proof of concept for font conversion: I anticipated people using it as a template for writing drivers targeted at specific display devices. But it acquired a number of users with SSD1306 devices. Further, the framebuf class acquired the ability to be subclassed and the official SSD1306 driver was adapted to do this. The ability to write display drivers subclassed on framebuf opened up the possibility of Writer becoming generic and usable with any display, colour or monochrome, with such a driver.
Users requested a number of improvements to the Writer class such as support for multiple displays, word wrapping and upside-down display. I have also implemented support for colour displays. All of this has increased the size.
Writer is now generic. In addition to SSD1306 it works with Nokia 5110 using this driver and this Adafruit colour display (driver for the latter to be posted soon).