Font size difference caused by Android font size settings


#1

Hi!

I’m developing an app and I’m using Android to test the app. While testing with a couple of devices I found out that some devices had different font sizes. After some searching I noticed these devices had their font size settings in Android set to small font. I’ve been searching if there’s a way to set the font size to a fixed amount but haven’t been able to find out how.

I’ve made two screenshots, one with a small font size and one with a normal font size.

Does anyone know how I can set the font size to a fixed amount or how to prevent the font sizes from changing depending on the phone settings? Thanks!


#2

I have this problem,too.
How can i solve this issue?? font size to fix??


#3

I am also struggling with this - surely it can’t be a new use case and there MUST be a way of disabling the app responding to system base font size changes?


#4

I found the solution using a cordova plugin to disable the user preferred text zoom.

You can find the plugin here: https://github.com/phonegap/phonegap-mobile-accessibility and add in the platform ready event:

platform.ready().then(() => {
    [...]
    if(window.MobileAccessibility){
       window.MobileAccessibility.usePreferredTextZoom(false);
    }
    [...]
});