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

TextAlign changes the offset of text #1268

Open
junkmail22 opened this issue Jan 18, 2024 · 0 comments
Open

TextAlign changes the offset of text #1268

junkmail22 opened this issue Jan 18, 2024 · 0 comments

Comments

@junkmail22
Copy link

When you choose a centrally-aligned TextLayout, the text is offset such that the position of the DrawParam is now the center of the text rather than the top-left corner. This is inconsistent with all other drawables, where unless specified otherwise by the DrawParam, the given position is the top-left corner of the drawable, as well as with previous versions of ggez.

As it currently stands, centrally-aligned text must be handled as a special case in all drawing logic, which is undesirable. Furthermore, if you want to set your text to be drawn with the given position as the center of the text, this is already possible with DrawParam::offset.

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

No branches or pull requests

1 participant