allow translators to override Windows font

to work around Qt's awful fallback handling on Windows 10

https://anki.tenderapp.com/discussions/ankidesktop/32922-chinese-characters-in-the-main-window-when-setting-language-to-japanese
This commit is contained in:
Damien Elmes 2019-03-06 15:28:49 +10:00
parent 09651be9e7
commit 0543df7dfa

View file

@ -229,8 +229,10 @@ class AnkiWebView(QWebEngineView):
if js is None:
js = ["jquery.js"]
if isWin:
widgetspec = "button { font-size: 12px; font-family:'Segoe UI'; }"
fontspec = 'font-size:12px;font-family:"Segoe UI";'
#T: include a font for your language on Windows, eg: "Segoe UI", "MS Mincho"
family = _('"Segoe UI"')
widgetspec = "button { font-size: 12px; font-family:%s; }" % family
fontspec = 'font-size:12px;font-family:%s;' % family
elif isMac:
family="Helvetica"
fontspec = 'font-size:15px;font-family:"%s";'% \