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

Feature: text align #98

Merged
merged 3 commits into from
Dec 29, 2024
Merged

Feature: text align #98

merged 3 commits into from
Dec 29, 2024

Conversation

entrhopi
Copy link
Contributor

Hello!

I've added rudimentary support for text alignment.
A new value for the text component has been added:
align = left,right,center

If the value is other than left the draw_text function will calculate the (pixel)length of the text and adjust the position accordingly.

Currently, this only works for single line text. I will revisit this in the future if nobody else is faster.

README has also been updated.

@gickowtf
Copy link
Owner

Hey thanks a lot for your effort. Give me a little time to check and test the whole thing :D

@entrhopi
Copy link
Contributor Author

Sure! Feedback is appreciated! Especially because my set of tests is very limited, and I'm always blind to the apparent errors. xD
I might have some time today to tackle the multiline handling too.

@entrhopi
Copy link
Contributor Author

Multiline support has also been added.

@gickowtf gickowtf merged commit 597274a into gickowtf:main Dec 29, 2024
2 checks passed
@gickowtf
Copy link
Owner

Many many thanks 🚀

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