-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Discussion on the implementation of NamedSize
fonts in Core
#3938
Comments
NamedSize
fonts in Core
There was a discussion sort of starting here by @GalaxiaGuy: #831 (comment)
For the points:
|
To my knowledge, we don't currently have anything beyond |
Regarding point 2: I mean the inverse of point 1. The ability to set something that is sized in the same way the font scales. i.e. using At the moment in Forms I'm using custom markup extension to do it. |
We've moved this issue to the Backlog milestone. This means that it is not going to be worked on for the coming release. We will reassess the backlog following the current release and consider this item at that time. To learn more about our issue management process and to have better expectation regarding different types of issues you can read our Triage Process. |
Based on the discussions here:
And the work here:
We now in a place that both needs and does not need
NamedSize
...The original design offered 2 features: font scaling and a special meaning to the OS
Font Scaling
The
NamedSize
concept used to be the only way to get scaled font sizes, but now it is built into the CoreFont
using theAutoScalingEnabled
property orWithAutoScaling
method. This is exposed at the Controls layer with a bunch ofFontAutoScalingEnabled
bindable properties on many of the controls that display text.The default value of
FontAutoScalingEnabled
istrue
which means that the font is scaled when a11y values are changed. So if the UI scaling is 2x and the font size is 12, then the actual rendered size is 24.This can be disabled by setting
FontAutoScalingEnabled
to `false":Special Meaning
The other value that the
NamedSize
values offered was for special OS meanings. However, this was often deceiving because it was a first-run thing and then fell apart. At XAML parse time, they are translated into a double with no idea that they were special values. Thus, they never did respond to OS changes. Once set, they are just a number and nothing special.If we want to actually expose those values to the user, we can maybe use a "stringly-typed enum" to allow for supporting the other values on the system. For example, we only had Title1, but there is also a Title2 and Title3.
The text was updated successfully, but these errors were encountered: