Skip to content

Commit 4e2bbad

Browse files
committed
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
1 parent f641e50 commit 4e2bbad

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

adafruit_display_text/bitmap_label.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,14 @@
2727
__repo__ = "https://github.com/adafruit/Adafruit_CircuitPython_Display_Text.git"
2828

2929
import displayio
30-
import bitmaptools
3130
from adafruit_display_text import LabelBase
3231

32+
try:
33+
import bitmaptools
34+
except ImportError:
35+
# We have a slower fallback for bitmaptools
36+
pass
37+
3338
try:
3439
from typing import Optional, Tuple
3540
from fontio import FontProtocol

0 commit comments

Comments
 (0)