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

Custom Fonts Height is too Higher then FontSize #17805

Open
inquick opened this issue Dec 19, 2024 · 1 comment
Open

Custom Fonts Height is too Higher then FontSize #17805

inquick opened this issue Dec 19, 2024 · 1 comment
Labels

Comments

@inquick
Copy link

inquick commented Dec 19, 2024

Describe the bug

I add two TextBlock in window, and use custom fonts. The Digiface FontFamily shows normally but the "思源黑体 CN Regular" shows not as what i want.
image
Is there any way to make "思源黑体 CN Regular" shows Alignment center?
The code is:
`

`

To Reproduce

Fonts.zip

  1. Copy the two ttf files to application resources under /Assets/Fonts/
  2. Add <TextBlock Background="Blue" Text="00:00" FontSize="20" FontFamily="avares://CommandCenter/Assets/Fonts/DIGITAL-REGULAR.TTF#Digiface" VerticalAlignment="Center" HorizontalAlignment="Center" TextAlignment="Center"/> <TextBlock Background="Blue" FontSize="20" FontFamily="avares://CommandCenter/Assets/Fonts/SourceHanSansCN-Regular.ttf#思源黑体 CN Regular" VerticalAlignment="Center" >Hello</TextBlock> in any view.axaml files.
    3. Build and abserve the UI about “Hello”.

Expected behavior

No response

Avalonia version

11.2.1

OS

Windows

Additional context

No response

@inquick inquick added the bug label Dec 19, 2024
@timunie
Copy link
Contributor

timunie commented Dec 20, 2024

Please try always latest version available, best nightly. Also worth to test Font on Word or similar, could also be a font issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants