-
Notifications
You must be signed in to change notification settings - Fork 1.9k
[Enhancement] Make named font size scaled for accessibility, and all numerical font sizes fixed #13543
Comments
This is especially important with font images. |
A solution to this problem for APN28 and above couldn't be found. Any working work around would be appreciated. |
Fwiw I am currently sprucing up my UI to work better with accessibility font scaling and am running into this exact problem quite hard. There really needs to be some way to tell Xamarin not to scale a specific label/whatever, for example when font icons are used. Expected would be for the app's text to become larger but not icons, and there really doesn't seem to exist any way to control this atm. I am not 100% certain if it would be enough for Xamarin to scale named sizes and not apply scaling to numeric font sizes, as sometimes you need a value between two named sizes and are forced to use a numeric size for text. Some kind of additional property/syntax would probably be required. Suggestion: Make all fonts scale with accessibility zoom as it currently does (to also ensure backwards compatibility), but add some kind of mechanism for preventing this for the special cases where scaling should not be applied. |
Is there anything I can do to reach out to developers or coders to find a solution to this? Being able to prevent user scaling of text seems pretty basic and extremely necessary but for the life of me i cannot find a solution! |
I've tried to solve this by settings the display metrics manually. You can insert this call at the begin of MainActivity.cs OnCreate method:
By the way, the "Display.GetMetrics()" method is deprecated now so i'm trying to fix it. |
Without usage of deprecated method
|
Summary
I cannot find a way to keep font sizes fixed on android between devices using differing font scale settings. This makes it impossible to create a neat interface for displaying information that is fixed across devices.
It would make logic that named font sizes are subject to user scaling but numbered font sizes are fixed to the developers design wishes.
API Changes
We would require an ability to set font scaling in mainactivity.cs
Intended Use Case
For users of Xamarin who desire to not have font wrapping out of view when users have system font scaling set above 1.
The text was updated successfully, but these errors were encountered: