Use browser's default font

This commit is contained in:
M66B
2021-01-16 08:19:56 +01:00
parent 030edd63de
commit efef382c51
2 changed files with 2 additions and 15 deletions

View File

@@ -69,10 +69,7 @@ public class WebViewEx extends WebView implements DownloadListener, View.OnLongC
settings.setSafeBrowsingEnabled(safe_browsing);
}
void init(
int height, float size, Pair<Integer, Integer> position,
float textSize, boolean monospaced,
IWebView intf) {
void init(int height, float size, Pair<Integer, Integer> position, IWebView intf) {
Log.i("Init height=" + height + " size=" + size);
this.height = (height == 0 ? getMinimumHeight() : height);
@@ -84,14 +81,6 @@ public class WebViewEx extends WebView implements DownloadListener, View.OnLongC
setScrollY(position.second);
}
WebSettings settings = getSettings();
if (textSize != 0) {
settings.setDefaultFontSize(Math.round(textSize));
settings.setDefaultFixedFontSize(Math.round(textSize));
}
if (monospaced)
settings.setStandardFontFamily("monospace");
this.intf = intf;
setWebViewClient(new WebViewClient() {