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

Godot Editor cutting off certain characters with vertical lines #92238

Open
MM4096 opened this issue May 22, 2024 · 3 comments
Open

Godot Editor cutting off certain characters with vertical lines #92238

MM4096 opened this issue May 22, 2024 · 3 comments

Comments

@MM4096
Copy link

MM4096 commented May 22, 2024

Tested versions

Reproduced in 4.2

System information

Godot v4.2.2.stable.mono - Ubuntu 23.10 23.10 - Wayland - Vulkan (Forward+) - integrated Intel(R) HD Graphics 4400 (HSW GT2) () - Intel(R) Core(TM) i7-4600U CPU @ 2.10GHz (4 Threads)

Issue description

Vertical lines in the script editor cuts off letters on that line (see image for example). I don't know why the lines are there (maybe preferred line length, like in Python?)

The vertical line seems to overwrite the lines of the letters. This only applies to small font sizes, where I assume the width of a vertical line is either smaller or equal to the width of a vertical line.
image

Steps to reproduce

Open a new text file, start typing until lines appear, zoom out until the vertical line cuts off letters.

Minimal reproduction project (MRP)

N/A

@kitbdev
Copy link
Contributor

kitbdev commented May 23, 2024

The lines are supposed to be in between characters, but it looks like it may not be rounding correctly. However, if the font size is too small it still won't have space.
You can disable them in the Editor Settings at text_editor/appearance/guidelines/show_line_length_guidelines.
Or you can change the text_editor/theme/highlighting/line_length_guideline_color color to be transparent.

@Calinou
Copy link
Member

Calinou commented May 23, 2024

The line length guidelines are supposed to be drawn behind text, but they appear in front of the text for some reason.

@kitbdev
Copy link
Contributor

kitbdev commented May 23, 2024

They are on top of the text since TextEdit draws the background and the text first and then CodeEdit draws after.
We would need to move it into TextEdit in order for it to be between the background and text, but it was moved out of TextEdit in #50122.
Maybe an virtual method can be added to draw in between the background and text?

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

No branches or pull requests

4 participants