-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
Some custom fonts in TextBox do not align with the center of the caret #15768
Comments
It should be fixed in #15481 but seems not. And btw your second textbox is not consolas. Consolas is monospace font right? Also can you also include a letter like g or y so it demostrate the lower bound of glyphs? |
The second TextBox uses the UniversNextPro font. The Consolas font will display like this: P.S.: I updated the demonstration for more clarity. |
The caret and glyph positions are not aligned to the pixel grid |
Duplicate of #10658 I believe |
@robloo not entirely sure this is an 100 % duplicate, as is about caret position, not font position in general. But could coupled, yes. |
@timunie Caret position should be calculated from the font dimensions. So I expect the underlying issue is the same. |
@Gillibald should decide if we want to close this in favor of #10658 |
Describe the bug
I have added a custom font to the TextBox, but the caret position is lower than the text.
Not every font has this issue, but I am currently experiencing it with Consolas and UniversNextPro.
This could be a font issue, but Word and Notepad++ don't have this problem.
To Reproduce
Expected behavior
A custom font can align the caret in the center like the default font, or it could display as it does in Word and Notepad++.
Word with Consolas font:
Notepad++ with Consolas font::
Avalonia version
11.0.10, 11.1.0-beta2
OS
Windows
Additional context
No response
The text was updated successfully, but these errors were encountered: