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

Make user aware that findCharactarPos returns top of the line position #2999

Open
wants to merge 1 commit into
base: 2.6.x
Choose a base branch
from

Conversation

dogunbound
Copy link
Contributor

This doesn't need any testing, just documentation changes. I really do think a lot of this confusion may be avoided if we atleast mention this "top of the line" stuff

@dogunbound
Copy link
Contributor Author

Linking #2988 to this

/// origin are applied).
/// the global coordinates (translation, rotation, scale and
/// origin are applied) at the top of the character's text
/// line.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd swap it around:

...position is at the top of the character's line in global coordinates...

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is "character's text line" descriptive enough? If you hadn't had these discussions over the past few days, would you understand what it means?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm thinking about adding some information to the SFML-Website repo with like an image that we can use to define:
"top of the line"
"bottom of the line"
"line height"
"glyph bounds"

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ascender height is very clear and googlable way of documenting what it's doing. I'm happy with this imho

@eXpl0it3r eXpl0it3r linked an issue May 14, 2024 that may be closed by this pull request
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

sf::Text::findCharacterPos() doesn't report the correct Y location
3 participants