fluttercommunity / fluttercommunity/flutter_webview_plugin

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

Đang mở
#895 1 bình luận 4 reaction 0 người được giao Xem trên GitHub
Ngôn ngữ chính
Java
Star
1.5k
Fork
936
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

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

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Hướng nghiên cứu

Xác định phần thiết lập Android WebView phía sau WebviewScaffold và xem xét cách các cài đặt của nó được cung cấp. Sử dụng hành vi textZoom được đề xuất làm điểm bắt đầu, đồng thời xác định cài đặt mới phải thực hiện gì khi được bật hoặc tắt. Được xem là hoàn tất khi plugin cung cấp tùy chọn này và hành vi của WebView nhất quán với cài đặt đã chọn.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Đánh giá

Công nghệ
android, css, flutter, html, java
Lĩnh vực
mobile, web-dev
Loại issue
Tính năng
Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức độ hoạt động
Đình trệ
Độ rõ ràng
Khá rõ ràng
Mức phù hợp với người mới
35/100

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.