use answer font family as well as size in answer comparison

This commit is contained in:
Damien Elmes 2010-01-22 00:31:50 +09:00
parent a3b3e7312a
commit 85ed9910cd

View file

@ -152,10 +152,10 @@ class View(object):
s = difflib.SequenceMatcher(None, b, a) s = difflib.SequenceMatcher(None, b, a)
sz = self.main.currentCard.cardModel.answerFontSize sz = self.main.currentCard.cardModel.answerFontSize
ok = "background: %s; color: #000; font-size: %dpx" % ( fn = self.main.currentCard.cardModel.answerFontFamily
passedCharColour, sz) st = "background: %s; color: #000; font-size: %dpx; font-family: %s;"
bad = "background: %s; color: #000; font-size: %dpx;" % ( ok = st % (passedCharColour, sz, fn)
failedCharColour, sz) bad = st % (failedCharColour, sz, fn)
for tag, i1, i2, j1, j2 in s.get_opcodes(): for tag, i1, i2, j1, j2 in s.get_opcodes():
if tag == "equal": if tag == "equal":