fluttercommunity / fluttercommunity/flutter_webview_plugin

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

Offen
#895 1 Kommentar 4 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
Vorherrschende Sprache
Java
Sterne
1.5k
Forks
938
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Beschreibung

## 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

Beitragsleitfaden

Für dieses Repository ist kein Beitragsleitfaden indexiert

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.