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

CodeEdit (TextEdit?) linewrap indentation is wrong if font hinting is set to "Normal" #101062

Open
wareya opened this issue Jan 3, 2025 · 0 comments
Assignees

Comments

@wareya
Copy link
Contributor

wareya commented Jan 3, 2025

Tested versions

4.4dev7

System information

Godot v4.4.dev7 - Windows 10 (build 19045) - Multi-window, 2 monitors - OpenGL 3 (Compatibility) - AMD Radeon RX 6800 (Advanced Micro Devices, Inc.; 32.0.12033.1030) - AMD Ryzen 5 7600X 6-Core Processor (12 threads)

Issue description

If font hinting is "normal" then the artificially indented wrapped text of a wrapping, wrap-indenting CodeEdit is misaligned with its parent line's indentation level.

Image

The issue goes away if subpixel positioning and rounding-remainders are both disabled.

Image

Something similar happens regardless of hinting level if Subpixel Positioning is disabled but rounding-remainders is left enabled, but the version with rounding-remainders applies to unindented/unwrapped text too, but is probably not noticeable with non-monospace fonts.

Image

Steps to reproduce

Set up a CodeEdit with some long indented text, turn on wrapping and wrap indentation, make it wrap, set the font to something where you can configure the hinting, switch between Normal and the other settings. The indentation level of the wrapped text will likely be wrong with Normal mode (might be font-sensitive).

Minimal reproduction project (MRP)

wrapbugrepro.zip

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

3 participants