-
-
Notifications
You must be signed in to change notification settings - Fork 21.4k
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
[Label] Add get_character_bounds method to get bounding rectangles of the characters. #84185
Conversation
566cf0c
to
9f8aa53
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Works great.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A few small details, LGTM otherwise
Will this be added to RichTextLabel? |
@bruvzg Would you mind updating the docs as suggested? |
9f8aa53
to
e9c219c
Compare
Thanks! |
Any chance something like this will be added for RichTextLabel? I get that it'd be a bit more complicated, but it would be incredibly useful for many things. |
Closes godotengine/godot-proposals#8299
Adds
Label.get_character_bounds(character pos)
method, which return bounding rectangle of the character. If the character is a non-visual character orpos
is invalid, emptyRect2
is returned. If the character is a part of a composite grapheme, the bounding rectangle of the whole grapheme is returned.