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.

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.

1 participant