We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Not all fonts have all expected characters used to check height. Maybe add some try/except to catch this?
Adafruit CircuitPython 5.3.0 on 2020-04-29; Adafruit Circuit Playground Bluefruit with nRF52840 >>> from adafruit_bitmap_font import bitmap_font >>> from adafruit_display_text import label >>> font = bitmap_font.load_font("/monoMMM_5_90.bdf") >>> my_label = label.Label(font, text="hello", color=0xFFFFFF) Traceback (most recent call last): File "<stdin>", line 1, in <module> File "adafruit_display_text/label.py", line 122, in __init__ File "adafruit_display_text/label.py", line 264, in _update_text File "adafruit_display_text/label.py", line 144, in _create_background_box AttributeError: 'NoneType' object has no attribute 'height' >>> glyph = font.get_glyph(ord("M")) >>> type(glyph) <class 'Glyph'> >>> glyph = font.get_glyph(ord(" ")) >>> type(glyph) <class 'NoneType'> >>> glyph = font.get_glyph(ord("j")) >>> type(glyph) <class 'NoneType'> >>>
The text was updated successfully, but these errors were encountered:
Hopefully fixed with #51
Sorry, something went wrong.
No branches or pull requests
Not all fonts have all expected characters used to check height. Maybe add some try/except to catch this?
The text was updated successfully, but these errors were encountered: