-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Properly hint text and improve font rendering. #76420
Labels
<Suggestion / Discussion>
Talk it out before implementing
Comments
Luckily we don’t have to completely rewrite the whole renderer, we can just swap over to using Freetype. ImGui even provides instructions, we just have to get around to it. |
I tried following the provided link to include ImGui, but build fails with the following error:
Which is strange given that building imgui by itself succeeds. |
No, that was #75698 |
Merged
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Is your feature request related to a problem? Please describe.
I think this screenshot makes the problem pretty clear. We are unable to detect the actual cap height of the text, leading to text being off centre.
Additionally, there is an extra 1px of space before and 3px of space after text (drawn in purple). This is the natural spacing embedded in the font, and it would be nice to remove it.
Solution you would like.
Change the current font rendering stack so that we can support autodetecting the cap height for different fonts and adjusting as necessary See #76404 (comment) for initial direction.
Describe alternatives you have considered.
Hand adjusting text in all user-visible UIs. Unfortunately, this breaks if the user changes the font, the font size, the font height, the font width, the font rendering mode, etc.
Additional context
Naming this issue was hard. The scope is strange, and I feel like the current label isn't very clear about what the actual goal is. I certainly didn't start this with the goal of rewriting the font renderer, but I guess that's what I am doing now.
The text was updated successfully, but these errors were encountered: