I've been using this package as part of the Adafruit_Python_SSD1306 package for few weeks now and I've been having issues making calls to the text drawing function using custom font paths (and consequently custom fonts as well).
As it is right now, any call made to adafruit_ssd1306.SSD1306_I2C.text() with or without a font_name= parameter specified expects a file font5x8.bin in the current working directory of the calling script despite what may be specified, rendering the font_name= keyword param useless.
After some digging it looks like the BitmapFont class is never instantiated with the font_name parameter, despite the BitmapFont class having a default parameter available to override. I have added the font_name parameter in the call to instantiate BitmapFont in this pull request, and it has fixed my build (allowing me to keep my font files out of the working directory of the active script).
Hopefully this pull request helps and this repo is still alive and well. Thanks
Hi all,
I've been using this package as part of the
Adafruit_Python_SSD1306
package for few weeks now and I've been having issues making calls to the text drawing function using custom font paths (and consequently custom fonts as well).As it is right now, any call made to
adafruit_ssd1306.SSD1306_I2C.text()
with or without afont_name=
parameter specified expects a filefont5x8.bin
in the current working directory of the calling script despite what may be specified, rendering thefont_name=
keyword param useless.After some digging it looks like the
BitmapFont
class is never instantiated with thefont_name
parameter, despite theBitmapFont
class having a default parameter available to override. I have added thefont_name
parameter in the call to instantiateBitmapFont
in this pull request, and it has fixed my build (allowing me to keep my font files out of the working directory of the active script).Hopefully this pull request helps and this repo is still alive and well. Thanks