Skip to content

Clarify visible_characters #108029

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

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

Joy-less
Copy link
Contributor

See: godotengine/godot-proposals#12654

This clarifies the behaviour of Label.visible_characters and RichTextLabel.visible_characters with regards to UNICODE. From my tests and the collaborator response, for all visible_characters_behavior options, a character is considered to be a UNICODE code point (A.K.A. a UTF-32 character), which may be inconsistent with the visible graphemes/runes and with C# UTF-16 strings.

@Joy-less Joy-less requested a review from a team as a code owner June 27, 2025 00:05
@AThousandShips AThousandShips added enhancement documentation cherrypick:4.3 Considered for cherry-picking into a future 4.3.x release cherrypick:4.4 Considered for cherry-picking into a future 4.4.x release labels Jun 27, 2025
@AThousandShips AThousandShips added this to the 4.x milestone Jun 27, 2025
@AThousandShips AThousandShips requested a review from a team June 27, 2025 07:54
Copy link
Member

@bruvzg bruvzg left a comment

Choose a reason for hiding this comment

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

Looks fine, this is how it works right now. We have code to detect grapheme clusters (used to control the cursor in text edit nodes), so we can eventually change this behavior if desired. But this will be a breaking change.

Joy-less and others added 2 commits June 27, 2025 16:15
Co-authored-by: A Thousand Ships <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cherrypick:4.3 Considered for cherry-picking into a future 4.3.x release cherrypick:4.4 Considered for cherry-picking into a future 4.4.x release documentation enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants