From 46dae2507b51fd3843fdac9957c5795d68b3cf45 Mon Sep 17 00:00:00 2001 From: Damien Elmes Date: Fri, 8 Jul 2016 16:17:06 +1000 Subject: [PATCH] tweaks to UI font on win/lin --- aqt/webview.py | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/aqt/webview.py b/aqt/webview.py index e8f5b3c4f..744860cb5 100644 --- a/aqt/webview.py +++ b/aqt/webview.py @@ -140,10 +140,20 @@ class AnkiWebView(QWebEngineView): return max(1, dpi / 96.0) def stdHtml(self, body, css="", bodyClass="", js=None, head=""): + if isWin: + fontspec = 'font-size:12px;font-family:"Segoe UI";font-weight: medium;' + elif isMac: + fontspec = "" + else: + family = self.font().family() + print("family", family) + fontspec = 'font-size:14px;font-family:%s;font-weight:medium;'%\ + family + self.setHtml(""" %s