conftypes: Remove quotes for QtFont.
This commit is contained in:
parent
ebee09b650
commit
c8fe5bd1d2
@ -703,6 +703,11 @@ class QtFont(Font):
|
||||
font.setPointSizeF(float(size[:-2]))
|
||||
elif size.lower().endswith('px'):
|
||||
font.setPointSizeF(int(size[:-2]))
|
||||
# The Qt CSS parser handles " and ' before passing the string to
|
||||
# QFont.setFamily. We could do proper CSS-like parsing here, but since
|
||||
# hopefully nobody will ever have a font with quotes in the family (if
|
||||
# that's even possible), we take a much more naive approach.
|
||||
family = family.replace('"', '').replace("'", '')
|
||||
font.setFamily(family)
|
||||
return font
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user