parent
112e4a1dad
commit
a62062af27
@ -44,6 +44,8 @@ Fixed
|
|||||||
- `:download --mhtml` now uses the new file dialog
|
- `:download --mhtml` now uses the new file dialog
|
||||||
- Insert mode now gets entered correctly with a non-100% zoom
|
- Insert mode now gets entered correctly with a non-100% zoom
|
||||||
- Word hints are now upper-cased correctly when hints -> uppercase is true
|
- Word hints are now upper-cased correctly when hints -> uppercase is true
|
||||||
|
- Font validation is now more permissive in the config, allowing e.g. "Terminus
|
||||||
|
(TTF)" as font name.
|
||||||
|
|
||||||
v0.9.1
|
v0.9.1
|
||||||
------
|
------
|
||||||
|
@ -743,7 +743,7 @@ class Font(BaseType):
|
|||||||
(?P<size>[0-9]+((\.[0-9]+)?[pP][tT]|[pP][xX]))
|
(?P<size>[0-9]+((\.[0-9]+)?[pP][tT]|[pP][xX]))
|
||||||
)\ # size/weight/style are space-separated
|
)\ # size/weight/style are space-separated
|
||||||
)* # 0-inf size/weight/style tags
|
)* # 0-inf size/weight/style tags
|
||||||
(?P<family>[A-Za-z0-9, "-]*)$ # mandatory font family""", re.VERBOSE)
|
(?P<family>.+)$ # mandatory font family""", re.VERBOSE)
|
||||||
|
|
||||||
def validate(self, value):
|
def validate(self, value):
|
||||||
self._basic_validation(value)
|
self._basic_validation(value)
|
||||||
|
@ -978,6 +978,8 @@ class TestFont:
|
|||||||
'inconsolatazi4':
|
'inconsolatazi4':
|
||||||
FontDesc(QFont.StyleNormal, QFont.Normal, -1, -1,
|
FontDesc(QFont.StyleNormal, QFont.Normal, -1, -1,
|
||||||
'inconsolatazi4'),
|
'inconsolatazi4'),
|
||||||
|
'Terminus (TTF)':
|
||||||
|
FontDesc(QFont.StyleNormal, QFont.Normal, -1, -1, 'Terminus (TTF)'),
|
||||||
'10pt "Foobar Neue"':
|
'10pt "Foobar Neue"':
|
||||||
FontDesc(QFont.StyleNormal, QFont.Normal, 10, None, 'Foobar Neue'),
|
FontDesc(QFont.StyleNormal, QFont.Normal, 10, None, 'Foobar Neue'),
|
||||||
'10PT "Foobar Neue"':
|
'10PT "Foobar Neue"':
|
||||||
@ -1042,7 +1044,7 @@ class TestFont:
|
|||||||
font_xfail('green'),
|
font_xfail('green'),
|
||||||
font_xfail('10pt'),
|
font_xfail('10pt'),
|
||||||
font_xfail('10pt ""'),
|
font_xfail('10pt ""'),
|
||||||
'%',
|
'',
|
||||||
])
|
])
|
||||||
def test_validate_invalid(self, klass, val):
|
def test_validate_invalid(self, klass, val):
|
||||||
with pytest.raises(configexc.ValidationError):
|
with pytest.raises(configexc.ValidationError):
|
||||||
@ -1102,7 +1104,6 @@ class TestFontFamily:
|
|||||||
'normal bold 10pt "Foobar Neue"',
|
'normal bold 10pt "Foobar Neue"',
|
||||||
'bold italic 10pt "Foobar Neue"',
|
'bold italic 10pt "Foobar Neue"',
|
||||||
'', # with none_ok=False
|
'', # with none_ok=False
|
||||||
'%',
|
|
||||||
]
|
]
|
||||||
|
|
||||||
@pytest.fixture
|
@pytest.fixture
|
||||||
|
Loading…
Reference in New Issue
Block a user