Oxanium Font is always vertically aligned to the top, or is Avalonia not rendering it correctly? #15262
Replies: 5 comments 4 replies
-
I tested out a TextBlock as the header for a menu item, where the background is set to orange and the menu item's background is blue. |
Beta Was this translation helpful? Give feedback.
-
What Avalonia version are you using? |
Beta Was this translation helpful? Give feedback.
-
This is apparently a known issue in other frameworks like Java Swing with fonts like Consolas: |
Beta Was this translation helpful? Give feedback.
-
In case you have an idea how to correct it let us know your thoughts. |
Beta Was this translation helpful? Give feedback.
-
I opened a PR which fixes this issue |
Beta Was this translation helpful? Give feedback.
-
Hi! Currently porting my WPF app to Avalonia, and the Oxanium font it uses doesn't seem to get rendered correctly.
Here's what I see in avalonia (The image isn't clipped; it's the entire client area. One pixel above is the titlebar):
And then this is what I see in WPF (Same as above, one pixel above is the titlebar area):
The menu items' text is offset towards the top, the tabs' text is slightly offset to the top, and the text in the bottom right corner is massively offset towards the top. I can fix all of this by manually adding a margin of
0,5,0,0
to most things but that's not really convenient...This is my XAML code for the bottom-right text block, which is the exact same for WPF and Avalonia:
And this is how I'm loading the font (it's placed in the Application.Resources at the very top, so it's always accessible anywhere):
Does anyone know what is causing this issue? Thanks!
Beta Was this translation helpful? Give feedback.
All reactions