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

PicoGraphics - measure_text measures long #1050

Open
ahnlak opened this issue Jan 16, 2025 · 2 comments
Open

PicoGraphics - measure_text measures long #1050

ahnlak opened this issue Jan 16, 2025 · 2 comments
Labels
bug Something isn't working

Comments

@ahnlak
Copy link
Contributor

ahnlak commented Jan 16, 2025

When using measure_text, it includes any spacing applied to the final letter. This is a pretty minor problem until you start working at higher values for scale and spacing.

As a crude example, consider a spaced out string of 'Pimoroni': as things currently stand, the function will measure
P i m o r o n i
(with the trailing space), while a more useful measure (for things like centering) would be
P i m o r o n i
(sans trailing space).

I thought I'd raise an issue for a sanity check before I actually starting changing the code :-)

@insanire-monachus
Copy link

Nope!!!.. you are not insane. I would agree.

@ahnlak
Copy link
Contributor Author

ahnlak commented Jan 18, 2025

Fix in. I'm assuming there's a terribly clever way @Gadgetoid can blend that into the eleventy-million branches 🤣

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants