mirror of
https://github.com/rsms/inter.git
synced 2024-11-17 07:47:33 +01:00
tooling: nit: do not crash if certain lib props do not exist in gen-var-designspace.py
This commit is contained in:
parent
5f12e203cb
commit
e5a7c7c8c1
1 changed files with 9 additions and 7 deletions
|
@ -25,14 +25,16 @@ def fixup_instance(designspace, instance):
|
|||
instance.styleMapFamilyName = instance.styleMapFamilyName.replace(' Display', '')
|
||||
|
||||
# remove WWSFamilyName and WWSSubfamilyName properties
|
||||
del instance.lib['com.schriftgestaltung.properties']
|
||||
if 'com.schriftgestaltung.properties' in instance.lib:
|
||||
del instance.lib['com.schriftgestaltung.properties']
|
||||
|
||||
customParameters = instance.lib['com.schriftgestaltung.customParameters']
|
||||
i = len(customParameters)
|
||||
while i > 0:
|
||||
i -= 1
|
||||
if customParameters[i][0] == 'Has WWS Names':
|
||||
del customParameters[i]
|
||||
if 'com.schriftgestaltung.customParameters' in instance.lib:
|
||||
customParameters = instance.lib['com.schriftgestaltung.customParameters']
|
||||
i = len(customParameters)
|
||||
while i > 0:
|
||||
i -= 1
|
||||
if customParameters[i][0] == 'Has WWS Names':
|
||||
del customParameters[i]
|
||||
|
||||
|
||||
def fixup_instances(designspace):
|
||||
|
|
Loading…
Reference in a new issue