Skip to content
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

fix bmp_lbl for ascenders and descenders #213

Merged
merged 1 commit into from
Nov 15, 2024

Conversation

FoamyGuy
Copy link
Contributor

@ladyada

Resolves: #201

I tested on PyPortal Titano with the font specified in the issue and confirmed with this change bitmap label no longer cuts off the top and bot of ascenders and descenders.

I looked into the position offset between Label and Bitmap label mentioned in the issue as well. The root cause of that the code using anchor point and anchor position which take into account the width and height of the bounding box. It turns out that Label and Bitmap label differ in the size that they come up for the height when background_tight=False (which is the default value). That difference in size results in a difference of location when placed with the relative anchors. If you use background_tight=True for both types then the height will end up the same and thus placement will also match. I think that is worthy of it's own separate issue as it seems unrelated specifically to the cutting off of ascenders and descenders.

@FoamyGuy FoamyGuy merged commit 43a4259 into adafruit:main Nov 15, 2024
1 check passed
adafruit-adabot added a commit to adafruit/Adafruit_CircuitPython_Bundle that referenced this pull request Nov 16, 2024
Updating https://github.com/adafruit/Adafruit_CircuitPython_Display_Shapes to 2.9.0 from 2.8.4:
  > Merge pull request adafruit/Adafruit_CircuitPython_Display_Shapes#75 from FoamyGuy/docs_fix
  > Merge pull request adafruit/Adafruit_CircuitPython_Display_Shapes#74 from FoamyGuy/dynamic_arc

Updating https://github.com/adafruit/Adafruit_CircuitPython_Display_Text to 3.1.7 from 3.1.6:
  > Merge pull request adafruit/Adafruit_CircuitPython_Display_Text#213 from FoamyGuy/bmp_lbl_asc_desc_fix
  > Merge pull request adafruit/Adafruit_CircuitPython_Display_Text#212 from FoamyGuy/wrong_args_fix

Updating https://github.com/adafruit/Adafruit_CircuitPython_DisplayIO_Layout to 2.2.0 from 2.1.1:
  > Merge pull request adafruit/Adafruit_CircuitPython_DisplayIO_Layout#94 from FoamyGuy/linear_layout_new

Updating https://github.com/adafruit/Adafruit_CircuitPython_Bundle/circuitpython_library_list.md to NA from NA:
  > Updated download stats for the libraries
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 this pull request may close these issues.

bitmap label cuts off part of text
2 participants