-
Notifications
You must be signed in to change notification settings - Fork 38
Bug fixes related to positioning and bounding box size #86
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
Conversation
…offset by deleting impact of newlines, bitmap_label: fix anchored_position rounding error, add speedup with load_glyphs
Please wait for reviewing this further until I deal with another issue another placement issue that still need to be resolved. Observed issue: When using a newline, "Hello\nworld." the anchor_position in the y-direction is not placed correctly. I also have some pylint issues to resolve. |
@kmatch98 Please tag one of us directly when you're ready for review so this doesn't get lost! Thanks! |
@FoamyGuy and @kattni - This is ready for your review and testing. I performed more testing and resolved a couple more bugs with positioning. Also, please note that I overrode some of the pylint messages. Main things improved: I performed testing on BuiltinFont ( One stylistic thing for consideration: The
and saw the background hangs off the screen.) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tested this out on PyPortal and Wio Terminal with a variety of the example scripts and a few others from recent issues. Everything appears to be working correctly
I also tested script fonts, and strings with newlines in them, both of them are working correctly after these fixes.
This looks good to me after the extra I see it was removed while I was writing this+
sign is removed (If it is actually extra).
Thanks for working on these fixes @kmatch98
Ok, now I'm getting a pylint error:
This error is caused by line that raises the exception. This is strange because I didn't change any of this. Did something change in the
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good to me now.
Thanks @kmatch98 for fighting through a few new pylint issues and all of the rest of these fixes!
I tested a bit more this morning with a CLUE using some of the project scripts that we have recently had issues with and all everything is looking good. I'm going to go ahead and merge this. |
Awesome! Thanks for the help on this! |
Updating https://github.com/adafruit/Adafruit_CircuitPython_CLUE to 2.2.5 from 2.2.4: > Merge pull request adafruit/Adafruit_CircuitPython_CLUE#33 from adafruit/lsm6ds33_fix Updating https://github.com/adafruit/Adafruit_CircuitPython_Display_Text to 2.8.3 from 2.8.2: > Merge pull request adafruit/Adafruit_CircuitPython_Display_Text#86 from kmatch98/many_cleanups
In doing testing of
label.py
andbitmap_label.py
several minor issues are observed. This set of fixes brings these two files inline with the latest fixes and resolves a couple more issues, including issue: #78Changes on both
label.py
andbitmap_label.py
:Correct left- and right-side of bounding box (showed up only with slanted fonts):


Problem: right side of background bounding box does not contain slanted typeface, left side is too far from text:
After solution to correct bounding box:
Correct y_offset by deleting impact of newlines (see issue
y_offset
should not include any impact due to newlines '\n' #78) that caused incorrect placement of text when trailing newlines\n
were present.Fixes on
bitmap_label
to bring it up to date withlabel
:_text_bounding_box
) including the error checking for BuiltinFont (builtin font does not have load_glyphs always #87)