From 3739231e650b6cdb6561970cd186d72a600e0cfd Mon Sep 17 00:00:00 2001 From: "Christopher T. Johnson" Date: Sun, 14 Apr 2024 20:32:05 -0400 Subject: [PATCH] Don't mess with actual font of fragment. --- plugins/merriam-webster.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/plugins/merriam-webster.py b/plugins/merriam-webster.py index d0b5344..6596dcb 100644 --- a/plugins/merriam-webster.py +++ b/plugins/merriam-webster.py @@ -356,7 +356,6 @@ def do_sense(sense: Sense|None, indent:int=3) -> tuple[list[Fragment], list[Line # XXX - This needs to expand to handle et, ins, lbs, prs, sgram, sls, vrs sdsense = trycast(DividedSense, v) assert sdsense is not None - print(r.italicFont.toString()) frag = Fragment(sdsense['sd']+' ', r.italicFont, color=r.baseColor) frag.setIndent(indent) line = Line() @@ -569,7 +568,7 @@ def parseText(frag: Fragment) -> list[Fragment]: # # Get the fonts we might need. # We can't use Resources() because we don't know the original font. - textFont = frag.font() + textFont = QFont(frag.font()) textFont.setWeight(QFont.Weight.Normal) textFont.setItalic(False) textFont.setCapitalization(QFont.Capitalization.MixedCase)