Skip to content

Conversation

@FoamyGuy
Copy link
Contributor

@FoamyGuy FoamyGuy commented Dec 12, 2025

The new version was always adding room for an outline to the Bitmap even when one wasn't used. My thought at the time was that an accent could be added at any time using an outline so it should pre-allocate the padding space for it.

But adding that extra padding means that all non-outlined text got shifted slightly, and had a larger background box size than before (if background is visible). It was only 1px by default, but now I think it's best to not have it shift at all, and if possible have the same default background box size as before when outlines aren't in use.

This change does that by only setting padding if outline is in use. When new accents get added, if they are outline accents, the padding will be adjusted as needed. I've also added the usage of max() so that if the user had manually specified a padding that was large enough then it won't be changed.

I also removed the hardcoded +2 from padding bottom I'm not entirely sure why that was there before. Perhaps it was an attempt to account for decenders, but those seem to still work as expected without that extra space. It along with superfluous + 0s are removed.

With this version non-outlined text is now the same size and position as it was before the recent change.

@FoamyGuy FoamyGuy requested a review from a team December 17, 2025 16:29
Copy link
Contributor

@dhalbert dhalbert left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great!

@dhalbert dhalbert merged commit 372cbe2 into adafruit:main Dec 17, 2025
1 check passed
adafruit-adabot pushed a commit to adafruit/Adafruit_CircuitPython_Bundle that referenced this pull request Dec 18, 2025
Updating https://github.com/adafruit/Adafruit_CircuitPython_RFM to 1.0.10 from 1.0.9:
  > Merge pull request adafruit/Adafruit_CircuitPython_RFM#21 from jerryneedell/jerryn_fifo

Updating https://github.com/adafruit/Adafruit_CircuitPython_RFM69 to 2.1.28 from 2.1.27:
  > Merge pull request adafruit/Adafruit_CircuitPython_RFM69#58 from jerryneedell/jerryn_fifo

Updating https://github.com/adafruit/Adafruit_CircuitPython_Display_Text to 4.0.2 from 4.0.1:
  > Merge pull request adafruit/Adafruit_CircuitPython_Display_Text#234 from FoamyGuy/non_outlined_size_fix
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.

2 participants