Don't mess with actual font of fragment.

This commit is contained in:
Christopher T. Johnson
2024-04-14 20:32:05 -04:00
parent e9f467666f
commit 3739231e65

View File

@@ -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 # XXX - This needs to expand to handle et, ins, lbs, prs, sgram, sls, vrs
sdsense = trycast(DividedSense, v) sdsense = trycast(DividedSense, v)
assert sdsense is not None assert sdsense is not None
print(r.italicFont.toString())
frag = Fragment(sdsense['sd']+' ', r.italicFont, color=r.baseColor) frag = Fragment(sdsense['sd']+' ', r.italicFont, color=r.baseColor)
frag.setIndent(indent) frag.setIndent(indent)
line = Line() line = Line()
@@ -569,7 +568,7 @@ def parseText(frag: Fragment) -> list[Fragment]:
# #
# Get the fonts we might need. # Get the fonts we might need.
# We can't use Resources() because we don't know the original font. # 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.setWeight(QFont.Weight.Normal)
textFont.setItalic(False) textFont.setItalic(False)
textFont.setCapitalization(QFont.Capitalization.MixedCase) textFont.setCapitalization(QFont.Capitalization.MixedCase)