-
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
fix: Enhance font weight determination for variable fonts #18894
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
base: master
Are you sure you want to change the base?
Conversation
Could you please also help to check if this is fixed? #18677 |
|
@cla-avalonia agree |
It's not fixed. I don't think your issue is related to the font weight determination. |
You can test this PR using the following package version. |
8adacc2
to
68d9ca7
Compare
You can test this PR using the following package version. |
I can't accept this hack. We need to add proper variable fonts support and actually control the wght axis. Variable fonts are not supported at the moment. Looking for the presence of fvar isn't enough. |
I agree. Weight = (fontSimulations & FontSimulations.Bold) != 0 ? FontWeight.Bold : (FontWeight)typeface.FontWeight;
#18113 effect: |
68d9ca7
to
e2e081d
Compare
You can test this PR using the following package version. |
What does the pull request do?
Fixes #18875 , enhance font weight determination for variable fonts.
What is the current behavior?
Font weight of the variable fonts is not correct.
What is the updated/expected behavior with this PR?
How was the solution implemented (if it's not obvious)?
Added variable font detection via 'fvar' table check
Checklist
Breaking changes
Obsoletions / Deprecations
Fixed issues
Fixes #18875