-
-
Notifications
You must be signed in to change notification settings - Fork 2.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
TextAlignment renders text in wrong location for External Fonts #17510
Comments
I have modified my description of this issue and uploaded a repro project. I previously believed this was an issue with the Rider previewer but am now aware it happens at runtime too, so this must be an issue with Avalonia itself. I do not yet have a workaround, this is rather critical because the basic building blocks of the UI is simply not rendering inconsistently. Here is an image showing the issue occurring at runtime. |
After further testing, it seems that the issue is specifically triggered by using a non-default The issue will still occur if
|
Fixed by: #17402 |
It sure is! Thanks :) |
Describe the bug
Avalonia does not render open type fonts loaded as a static resource in the correct location in certain circumstances. The circumstance seems to depend on the text length, text alignment, and previewer zoom %.
For example, this center aligned text is rendering as right-aligned:
If I left-align it it appears as centered:
If I removed a single 't' from the end of the string it then renders in the correct location....?
I have tested with two fonts, both open types as static resource, both behaved inconsistently.
Using a regular system font like Arial works as intended.
To Reproduce
Ive uploaded a repro project -
fonttest.zip
Expected behavior
Open type fonts as a static resource are rendered in their expected location (based on layout settings).
Avalonia version
11.2
OS
Windows
Additional context
Rider 2024.1.4
The text was updated successfully, but these errors were encountered: