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

Don't include the spacing after the final letter when measuring bitmap text #1051

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

ahnlak
Copy link
Contributor

@ahnlak ahnlak commented Jan 18, 2025

As mentioned in #1050, measure_text erroneously includes the spacing after the final character of a string in it's measurement, for bitmap fonts.

This patch fixes it; it probably needs highlighting in the release notes wherever it ends up, in case people (like me!) have dodgy hacks in their code to adjust the returned length.

(tested through to Presto firmware - which was an annoyingly convoluted build, I can tell you - so at least it should be painless to pick up in everything that rolls PicoGraphics in)

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