summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFlorian Bruhin <me@the-compiler.org>2020-11-18 09:59:07 +0100
committerFlorian Bruhin <me@the-compiler.org>2020-11-24 18:58:26 +0100
commitf88aabbcde14775cbce9145727eb7412084f6445 (patch)
treea1e7d2341746c0d6eb9c4a83c8baecee2df53471
parentd9086ca91ac0a5087fcd91e28230c4822083a4f9 (diff)
downloadqutebrowser-f88aabbcde14775cbce9145727eb7412084f6445.tar.gz
qutebrowser-f88aabbcde14775cbce9145727eb7412084f6445.zip
Fix font quoting for font family names with a dot
With macOS Big Sur (11.0), the default monospace font family we get from QFontDatabase is ".AppleSystemUIFontMonospaced". The leading dot in there leads to a stylesheet like: font: 10pt .AppleSystemUIFontMonospaced; Which fails to parse, thus messing up styling entirely on Big Sur. Fixes #5663 (cherry picked from commit 56b1d21d66204fb1c2507c6819ae731aab463f00)
-rw-r--r--qutebrowser/config/configutils.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/qutebrowser/config/configutils.py b/qutebrowser/config/configutils.py
index 3f7823772..04f0abb9c 100644
--- a/qutebrowser/config/configutils.py
+++ b/qutebrowser/config/configutils.py
@@ -287,7 +287,7 @@ class FontFamilies:
def _quoted_families(self) -> typing.Iterator[str]:
for f in self._families:
- needs_quoting = any(c in f for c in ', ')
+ needs_quoting = any(c in f for c in '., ')
yield '"{}"'.format(f) if needs_quoting else f
def to_str(self, *, quote: bool = True) -> str: