mirror of
https://github.com/ankitects/anki.git
synced 2025-11-11 07:07:13 -05:00
fix font hack
This commit is contained in:
parent
beaca57129
commit
204ed5c18a
1 changed files with 2 additions and 2 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Reference in a new issue