Allow font names with integers in them.
This commit is contained in:
parent
1d27dcca81
commit
1dc9862c0b
@ -688,7 +688,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-z, "-]*)$ # mandatory font family""", re.VERBOSE)
|
(?P<family>[A-Za-z0-9, "-]*)$ # mandatory font family""", re.VERBOSE)
|
||||||
|
|
||||||
def validate(self, value):
|
def validate(self, value):
|
||||||
if not value:
|
if not value:
|
||||||
|
@ -1095,6 +1095,9 @@ class FontTests(unittest.TestCase):
|
|||||||
# (style, weight, pointsize, pixelsize, family
|
# (style, weight, pointsize, pixelsize, family
|
||||||
'"Foobar Neue"':
|
'"Foobar Neue"':
|
||||||
FontDesc(QFont.StyleNormal, QFont.Normal, -1, -1, 'Foobar Neue'),
|
FontDesc(QFont.StyleNormal, QFont.Normal, -1, -1, 'Foobar Neue'),
|
||||||
|
'inconsolatazi4':
|
||||||
|
FontDesc(QFont.StyleNormal, QFont.Normal, -1, -1,
|
||||||
|
'inconsolatazi4'),
|
||||||
'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"':
|
||||||
|
Loading…
Reference in New Issue
Block a user