Allow font names with integers in them.
This commit is contained in:
parent
1d27dcca81
commit
1dc9862c0b
@ -686,9 +686,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:
|
||||
|
@ -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"':
|
||||
|
Loading…
Reference in New Issue
Block a user