Home > Blockchain >  Device Fonts settings are affecting app fonts - Ionic 6 (Capacitor) Android
Device Fonts settings are affecting app fonts - Ionic 6 (Capacitor) Android

Time:12-11

Our team is struggling with an issue in Ionic 6.

We would like our mobile app fonts to be independent of device fonts settings on Android phone. We would like, device fonts settings should not affect our app font size etc.

There is a plugin available for Ionic 3 (Cordova) But for Capacitor, we haven't found a solution.

Any help is appreciated

CodePudding user response:

You can use the same (Cordova) plugin in Capacitor.

https://capacitorjs.com/docs/v2/cordova/using-cordova-plugins

https://capacitorjs.com/docs/plugins/cordova

CodePudding user response:

As already mentioned, you can use Cordova plugins in Capacitor too.

That being said, fixing the value of the textZoom property of your webView to 100(%) is all you need to achieve what you're after. You can do this, for example, in the onStart method of your MainActivity.kt/java.

override fun onStart() {
  ...
  bridge.webView.settings.textZoom = 100
}
  • Related