fluttercommunity / fluttercommunity/flutter_webview_plugin

Enabling an option to ignore system font setting for the webview in Android

Aperta
#895 1 commento 4 reazioni 0 assegnatari Vedi su GitHub
Lingua principale
Java
Stelle
1.5k
Fork
938
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

## Use case

I am currently facing a limitation with flutter_webview_plugin in Android.
When user changes font size on their device (Settings -> Accessibility -> Font Size), webview uses this adjusted font size.
That results overlapping texts and layouts of the content being incorrect.
So I need the webview to ignore the system font settings and load webview with specified font sizes in HTML/CSS.

## Proposal

The font size setting in Settings on user device affects the textZoom property of the webview.
In Android webview there is property we can set to force webview to display text in original sizes (specified in html/css of the web).

webView.getSettings().setTextZoom(100);

I am suggesting to add that property into the webview plugin. If there is any event that system font size must be used for webview as well, Please define a new setting in the WebviewScaffold to enable or disable this property.

eg: withTextZoom : true

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.