adafruit / Adafruit_Blinka_Displayio

Displayio for Blinka
MIT License
14 stars 20 forks source link

Remove Pillow Dependency #121

Closed makermelissa closed 10 months ago

makermelissa commented 11 months ago

Pillow is used as a dependency only insofar as it is used to load the font for fontio. I left that in place because I was thinking that by relying on the bitmap font library, it would create a circular dependency, but am now realizing that is not the case. CircuitPython uses the bitmap font library already, so it makes sense to list it as a dependency. Both this library and that would depend on Blinka, but that's it. The font file would also need to be included as a pcf file instead of pbm/pil files.

makermelissa commented 10 months ago

This ended up being a bit trickier than I thought because of a circular import issue of bitmap_font needing the Glyph class from fontio. Several pillow functions were also being utilized. In the end, this greatly simplified fontio because bitmap_font does pretty much all the heavy lifting.