I’m trying to disable dynamic font scaling for Android, basically I want to ignore system-level font size and style so I can set my own font sizes.
From my understanding --ion-dynamic-font is only for iOS, since I’ve tried setting it to initial value to opt-out, and it has no effect on on my Android Capacitor app.
From the Ionic’s post on Dynamic Font Scaling, it says:
“The Android Web View’s font scaling mechanism is always enabled in web content and will automatically scale font sizes defined using the px unit.”
But doesn’t really explain how to disable that scaling, if at all possible? I have also tried using both px and rem units in my components.
Seems like using vw units helps a bit, as it makes a bit more resilient against system-level font scaling. Probably can make it manageable, but that would require a lot of refactor and might feel too impactful. Most likely I’ll have to go with something like text-zoom or editing the Java file to completely disable it, to your point.