Skip to content

Exception with multiple consecutive newlines in bitmap label #183

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
jepler opened this issue Mar 10, 2023 · 0 comments · Fixed by #184
Closed

Exception with multiple consecutive newlines in bitmap label #183

jepler opened this issue Mar 10, 2023 · 0 comments · Fixed by #184

Comments

@jepler
Copy link
Contributor

jepler commented Mar 10, 2023

>>> 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant