Xamarin.Forms inconsistent fontsize behavior when Accessibilty settings are applied.

Created on 10 Jul 2019  路  8Comments  路  Source: xamarin/Xamarin.Forms

Description

When setting a size for usage with the Label's FontSize property, the Android and iOS functionality differ when Accessibility settings are changed. Android honors the scaling of both NamesSize and explicit values (e.g, 12) whereas, iOS does not scale either NamedSize or explicit values.
Previously reported here... https://xamarin.github.io/bugzilla-archives/33/33579/bug.html

Steps to Reproduce

  1. Create a standard Xamarin.Forms application
  2. Add a Label with FontSize="Medium"
  3. Add a Label with FontSize="12"
  4. Go to the Device's Settings app
    4.1. Android - search for Font size or,
    4.2. iOS - search for Text size
  5. Use the sliders to scale up or scale down the font size
  6. Go back into the app and observe the font sizes of the labels

Expected Behavior

Android - The NamedSize should change alongside the scaling of accessibility, the explicit value should not.
iOS - The NamedSize should change alongside the scaling of accessibility, the explicit value should not.

Actual Behavior

Android - The NamedSize and explicit value both scale with the accessibility settings.
iOS - Neither the NamedSize or explicit value scale with the accessibility settings.

Basic Information

  • Version with issue: 3.5.0.169047
  • Last known good version: N/A
  • IDE: Visual Studio Enterprise 16.1.5
  • Platform Target Frameworks:

    • iOS: 12.10.0.157

    • Android: 9.3.0.23

    • UWP: 16299

  • Android Support Library Version: 28.0.0.1
  • Nuget Packages: N/A
  • Affected Devices: iPad Mini, iPad (5th gen), Samsung Note 9, Sony Experia L1

Screenshots

Reproduction Link

unverified bug

Most helpful comment

image
The fact that namedsizes have wildly different sizes per platform means that they're useless when attempting to achieve a cross platform UI that looks reasonably the same.
It would be great if we could specify our own sizes and have then scaled according to accessibility options.

All 8 comments

This was implemented on iOS for named sizes in https://github.com/xamarin/Xamarin.Forms/pull/5985 .

Yep, please update to 4.1. Thanks!

There is the further question whether this could, or should, also apply to sizes specified as numbers.

image
The fact that namedsizes have wildly different sizes per platform means that they're useless when attempting to achieve a cross platform UI that looks reasonably the same.
It would be great if we could specify our own sizes and have then scaled according to accessibility options.

@samhouts, @GalaxiaGuy, Thanks for the update!

@samhouts, @GalaxiaGuy, What about explicit font sizes on iOS? Setting a font size to an explicit value will not update when accessibility is updated. Name sizes works but explicit values do not.

FontSize different devices
samsung s9 = ok good
but huawei big font

https://forums.xamarin.com/discussion/179920/fontsize-different-devices#latest

I am facing this issue , it says cross platform but same ui looks big on iOS and smaller on android

Was this page helpful?
0 / 5 - 0 ratings