Checks needed for the dir attribute. Caught by Lasse Fister.
git-svn-id: http://svn.robofab.com/branches/ufo3k@573 b5fa9d6c-a76f-4ffd-b3cb-f825fc41095c
This commit is contained in:
parent
a6ae274211
commit
89daa72612
@ -479,6 +479,8 @@ def fontInfoWOFFMetadataExtensionNameValidator(value):
|
|||||||
dictPrototype = {"text" : (basestring, True), "language" : (basestring, False), "dir" : (basestring, False), "class" : (basestring, False)}
|
dictPrototype = {"text" : (basestring, True), "language" : (basestring, False), "dir" : (basestring, False), "class" : (basestring, False)}
|
||||||
if not genericDictValidator(value, dictPrototype):
|
if not genericDictValidator(value, dictPrototype):
|
||||||
return False
|
return False
|
||||||
|
if "dir" in value and value.get("dir") not in ("ltr", "rtl"):
|
||||||
|
return False
|
||||||
return True
|
return True
|
||||||
|
|
||||||
def fontInfoWOFFMetadataExtensionValueValidator(value):
|
def fontInfoWOFFMetadataExtensionValueValidator(value):
|
||||||
@ -488,6 +490,8 @@ def fontInfoWOFFMetadataExtensionValueValidator(value):
|
|||||||
dictPrototype = {"text" : (basestring, True), "language" : (basestring, False), "dir" : (basestring, False), "class" : (basestring, False)}
|
dictPrototype = {"text" : (basestring, True), "language" : (basestring, False), "dir" : (basestring, False), "class" : (basestring, False)}
|
||||||
if not genericDictValidator(value, dictPrototype):
|
if not genericDictValidator(value, dictPrototype):
|
||||||
return False
|
return False
|
||||||
|
if "dir" in value and value.get("dir") not in ("ltr", "rtl"):
|
||||||
|
return False
|
||||||
return True
|
return True
|
||||||
|
|
||||||
# ----------
|
# ----------
|
||||||
|
Loading…
x
Reference in New Issue
Block a user