diff --git a/qutebrowser/config/conftypes.py b/qutebrowser/config/conftypes.py index 564f672d7..887f036a1 100644 --- a/qutebrowser/config/conftypes.py +++ b/qutebrowser/config/conftypes.py @@ -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