Exception with multiple consecutive newlines in bitmap label
jepler opened this issue · 0 comments
jepler commented
>>> l = adafruit_display_text.bitmap_label.Label(terminalio.FONT)
>>> l.text = '1\n\n\n\n\n\n\n\n\n\n1'
Warning: Glyph clipped, exceeds descent property: "1"
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "adafruit_display_text/__init__.py", line 416, in text
File "adafruit_display_text/bitmap_label.py", line 539, in _set_text
File "adafruit_display_text/bitmap_label.py", line 206, in _reset_text
File "adafruit_display_text/bitmap_label.py", line 443, in _place_text
File "adafruit_display_text/bitmap_label.py", line 469, in _blit
ValueError: out of range of target
This may be because _text_bounding_box
does not correctly account for multiple consecutive newlines.