diff options
author | Florian Bruhin <git@the-compiler.org> | 2015-02-25 23:20:09 +0100 |
---|---|---|
committer | Florian Bruhin <git@the-compiler.org> | 2015-03-18 23:13:42 +0100 |
commit | 4bad99e39471b8dcfcda9ef5236f828ff75c2552 (patch) | |
tree | 989dc71472e0e3feffeda598d567c10a1b928c36 | |
parent | 6fe816008fa43747dfa6596c8cae363ebe6db104 (diff) | |
download | qutebrowser-4bad99e39471b8dcfcda9ef5236f828ff75c2552.tar.gz qutebrowser-4bad99e39471b8dcfcda9ef5236f828ff75c2552.zip |
Allow font names with integers in them.
-rw-r--r-- | qutebrowser/config/configtypes.py | 6 | ||||
-rw-r--r-- | qutebrowser/test/config/test_configtypes.py | 3 |
2 files changed, 6 insertions, 3 deletions
diff --git a/qutebrowser/config/configtypes.py b/qutebrowser/config/configtypes.py index 0cc7592b4..f394d87c5 100644 --- a/qutebrowser/config/configtypes.py +++ b/qutebrowser/config/configtypes.py @@ -661,9 +661,9 @@ class Font(BaseType): ) | # size (<float>pt | <int>px) (?P<size>[0-9]+((\.[0-9]+)?[pP][tT]|[pP][xX])) - )\ # size/weight/style are space-separated - )* # 0-inf size/weight/style tags - (?P<family>[A-Za-z, "-]*)$ # mandatory font family""", re.VERBOSE) + )\ # size/weight/style are space-separated + )* # 0-inf size/weight/style tags + (?P<family>[A-Za-z0-9, "-]*)$ # mandatory font family""", re.VERBOSE) def validate(self, value): if not value: diff --git a/qutebrowser/test/config/test_configtypes.py b/qutebrowser/test/config/test_configtypes.py index 3ec3e6cb5..6133b18be 100644 --- a/qutebrowser/test/config/test_configtypes.py +++ b/qutebrowser/test/config/test_configtypes.py @@ -1095,6 +1095,9 @@ class FontTests(unittest.TestCase): # (style, weight, pointsize, pixelsize, family '"Foobar Neue"': FontDesc(QFont.StyleNormal, QFont.Normal, -1, -1, 'Foobar Neue'), + 'inconsolatazi4': + FontDesc(QFont.StyleNormal, QFont.Normal, -1, -1, + 'inconsolatazi4'), '10pt "Foobar Neue"': FontDesc(QFont.StyleNormal, QFont.Normal, 10, None, 'Foobar Neue'), '10PT "Foobar Neue"': |