From 204ed5c18a1f5ef2a5a72e4936fdb46530bac2cf Mon Sep 17 00:00:00 2001 From: Damien Elmes Date: Thu, 15 Nov 2018 14:04:08 +1000 Subject: [PATCH] fix font hack --- aqt/editor.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/aqt/editor.py b/aqt/editor.py index 5e3aa10af..816b11184 100644 --- a/aqt/editor.py +++ b/aqt/editor.py @@ -991,9 +991,9 @@ class EditorWebView(AnkiWebView): runHook("EditorWebView.contextMenuEvent", self, m) m.popup(QCursor.pos()) -# QFont returns "Kozuka Gothic Pro L" but WebEngine expects "Kozuka Gothic Pro" +# QFont returns "Kozuka Gothic Pro L" but WebEngine expects "Kozuka Gothic Pro Light" # - there may be other cases like a trailing 'Bold' that need fixing, but will # wait for further reports first. def fontMungeHack(font): - return re.sub(" L$", "", font) + return re.sub(" L$", " Light", font) addHook("mungeEditingFontName", fontMungeHack)