0

This is the same app, on 2 different devices. The layout seems to scale just fine, but the font size does not. I have no clue what could be the cause or where to start looking. The first is on a Pixel 2 and looks normal, the second is on a Galaxy A7 2018 and the text is off scale.

enter image description here

enter image description here

4
  • My assumption is that Galaxy S7 has the "elderly mode" enabled - all text is enlarged on the device by default. Do you think that's the case? Commented Jun 8, 2019 at 16:14
  • @George I thought so too, gonna take a look in the settings, but I see it happening on a few devices, and I don't think it is because of that setting. Seems like the whole UI is just scaled too big somehow Commented Jun 8, 2019 at 17:17
  • @George Indeed I was wrong, it is exactly that option! Commented Jun 8, 2019 at 17:27
  • Haha well, I actually encountered similar behavior when I borrowed a phone to test my app on. Apparently, people with farsightedness use that setting to read text easier. You might want to consider adjusting your UI for that group of people, since accessibility does matter. Commented Jun 8, 2019 at 17:34

1 Answer 1

1

George in the comments was right, it was an option in android to scale fonts that caused this effect. I had to use the code (from here) below to set the app-wide textScaleFactor back to 1.0.

MaterialApp(
      builder: (context, child) {
        return MediaQuery(
          child: child,
          data: MediaQuery.of(context).copyWith(textScaleFactor: 1.0),
        );
      },
)
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.