From 6b65cfc08fc3c1d8a7393fa3ca7c0a954880b23f Mon Sep 17 00:00:00 2001 From: Damien Elmes Date: Sat, 27 Sep 2014 10:26:14 +0900 Subject: [PATCH 1/2] disable embedded fonts on osx --- aqt/utils.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/aqt/utils.py b/aqt/utils.py index 21312b232..53b3509cc 100644 --- a/aqt/utils.py +++ b/aqt/utils.py @@ -331,6 +331,10 @@ def mungeQA(col, txt): txt = stripSounds(txt) # osx webkit doesn't understand font weight 600 txt = re.sub("font-weight: *600", "font-weight:bold", txt) + if isMac: + # custom fonts cause crashes on osx at the moment + txt = txt.replace("font-face", "invalid") + return txt def applyStyles(widget): From ba7abb53e27f75d0cc94609bc7f4fc5695244b63 Mon Sep 17 00:00:00 2001 From: Damien Elmes Date: Sat, 27 Sep 2014 10:32:21 +0900 Subject: [PATCH 2/2] make sure we save note type after fixing ad bug --- anki/collection.py | 1 + 1 file changed, 1 insertion(+) diff --git a/anki/collection.py b/anki/collection.py index c5b2a3e20..ef052dc99 100644 --- a/anki/collection.py +++ b/anki/collection.py @@ -699,6 +699,7 @@ select id from notes where mid not in """ + ids2str(self.models.ids())) if t['did'] == "None": t['did'] = None problems.append(_("Fixed AnkiDroid deck override bug.")) + self.models.save(m) if m['type'] == MODEL_STD: # model with missing req specification if 'req' not in m: