summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFlorian Bruhin <git@the-compiler.org>2017-10-11 22:05:53 +0200
committerFlorian Bruhin <git@the-compiler.org>2017-10-11 22:14:58 +0200
commitf035d4f3625c8cec17cd8595fee85fc1ecd96e7c (patch)
tree95b7d14de7e5a57a308fd798c872d6165b4b5418
parenta21a60c5cac55a936005b1d1d168c3fff32452b8 (diff)
downloadqutebrowser-f035d4f3625c8cec17cd8595fee85fc1ecd96e7c.tar.gz
qutebrowser-f035d4f3625c8cec17cd8595fee85fc1ecd96e7c.zip
Fix quote handling for fonts.monospace family
-rw-r--r--qutebrowser/config/configtypes.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/qutebrowser/config/configtypes.py b/qutebrowser/config/configtypes.py
index 46727210e..ace0900f9 100644
--- a/qutebrowser/config/configtypes.py
+++ b/qutebrowser/config/configtypes.py
@@ -1067,14 +1067,16 @@ class QtFont(Font):
# through.
raise ValueError("Unexpected size unit in {!r}!".format(
size)) # pragma: no cover
+
+ if family == 'monospace':
+ family = self.monospace_fonts
# 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("'", '')
- if family == 'monospace':
- family = self.monospace_fonts
font.setFamily(family)
+
return font