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

get_character_line reports wrong line in RichTextLabel #80919

Closed
henriquelalves opened this issue Aug 23, 2023 · 0 comments · Fixed by #81064
Closed

get_character_line reports wrong line in RichTextLabel #80919

henriquelalves opened this issue Aug 23, 2023 · 0 comments · Fixed by #81064
Assignees
Milestone

Comments

@henriquelalves
Copy link
Contributor

Godot version

Master branch [6758a7f]

System information

Manjaro

Issue description

get_character_line returns the wrong line on some characters when Autowrap Mode is not set to "Off". I couldn't understand the source of error, but apparently it happens when the text breaks lines in Autowrap "Arbitrary", or when the text auto-formats to remove extra space characters. The following images shows a case when this error happens:

test1
test2

The problem is obvious on the the last two "c"s that should been on line 4, but instead only the last one is. This offset happened on the second letter "b", that should been line 1 (but it's shown as line 0).

Steps to reproduce

Use a RichText label and set Autowrap mode to any option but "Off". Some texts might have this problem when you query for a character line.

Minimal reproduction project

bug_character_line.zip

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants