-
Notifications
You must be signed in to change notification settings - Fork 30
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
Font Override wont work for all controls (probably due to this...) #1287
Comments
There's a tradeoff here that we have to figure out, either you have fontfamily specific resource keys for each control or they use the ones coming directly from Typography.xaml. If we make the control styles use the ones from Typography.xaml instead of having things like OutlineButtonFamilyFamily then we lose the ability to customize fonts for specific controls/styles and are limited to only overriding the font family globally. Due to how resource aliasing works, you can have Resource B be an alias for Resource A and then expect B to change if A is overridden at a later point in time. So we may need to change things like this: Uno.Themes/src/library/Uno.Material/Styles/Controls/v2/CheckBox.xaml Lines 104 to 107 in 0b2a7a9
Which will be a breaking change FYI @Xiaoy312 / @agneszitte |
@carldebilly FYI |
Current behavior
Font overriding is not working for all controls.
For instance:
If we try to override the "LabelLargeFontFamily", it will work fine for Textblocks.
However, Buttons will not reproduce the same override as expected since the font they use is "LabelLargeFontFamily".
Taking a look at themes code, I found:
In Typography.xaml , the following line:
And in Button.xaml , its font definition:
So, since it is not referencing directly "LabelLargeFontFamily", I suppose it will never reproduce the override.
Expected behavior
Font Override should work everywhere.
How to reproduce it (as minimally and precisely as possible)
Just use Figma Plugin for example or a new app and try to override the referred font.
Environment
Nuget Package:
Package Version(s):
Affected platform(s):
Anything else we need to know?
The text was updated successfully, but these errors were encountered: