From 4e2bbade5ea1bb88573b77bb2d2285fab920cf37 Mon Sep 17 00:00:00 2001 From: James Ward Date: Tue, 31 Oct 2023 16:21:51 -0400 Subject: [PATCH] chore: allow use of bitmap_label without bitmaptools in some cases, bitmaptools may not even be used - such as when displayio.Bitmap supports blit. in others, the module can run without bitmaptools as it has a fallback which works even if it's slower --- adafruit_display_text/bitmap_label.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/adafruit_display_text/bitmap_label.py b/adafruit_display_text/bitmap_label.py index 5df2286..d25b3fd 100755 --- a/adafruit_display_text/bitmap_label.py +++ b/adafruit_display_text/bitmap_label.py @@ -27,9 +27,14 @@ __repo__ = "https://github.com/adafruit/Adafruit_CircuitPython_Display_Text.git" import displayio -import bitmaptools from adafruit_display_text import LabelBase +try: + import bitmaptools +except ImportError: + # We have a slower fallback for bitmaptools + pass + try: from typing import Optional, Tuple from fontio import FontProtocol