Don't mess with actual font of fragment.
This commit is contained in:
@@ -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)
|
||||||
|
|||||||
Reference in New Issue
Block a user