1
0
Fork 0
mirror of https://github.com/M66B/FairEmail.git synced 2024-12-31 20:25:38 +00:00

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

@ -1984,9 +1984,7 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
webView.setMinimumHeight(height);
webView.init(
height, size, position,
textSize, monospaced,
webView.init(height, size, position,
new WebViewEx.IWebView() {
@Override
public void onSizeChanged(int w, int h, int ow, int oh) {

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() {