s3.styleName = "BoldWide" s3.location = dict(weight=1000, width=1000) doc.addSource(s3) #----------- # instances #----------- i0 = InstanceDescriptor() i0.name = 'instance_LightCondensed' i0.familyName = familyName i0.styleName = "Medium" i0.path = os.path.join(root, "instances", "MutatorSansTest-Medium.ufo") i0.location = dict(weight=500, width=327) i0.kerning = True i0.info = True doc.addInstance(i0) #------- # rules #------- # TODO: add rules to match the contents of `MutatorSans.designspace` # http://github.com/LettError/mutatorSans/blob/master/MutatorSans.designspace #-------- # saving #-------- path = os.path.join(root, "MutatorSans__Test__.designspace") doc.write(path)
s1.styleName = "Bold" s1.location = dict(weight=700) doc.addSource(s1) #----------- # instances #----------- i0 = InstanceDescriptor() i0.name = 'instance_Regular' i0.familyName = familyName i0.styleName = "Regular" i0.path = os.path.join(root, "instances", "NotoSerifTagalog-Regular.ufo") i0.location = dict(weight=400) i0.kerning = True i0.info = True doc.addInstance(i0) i1 = InstanceDescriptor() i1.name = 'instance_Medium' i1.familyName = familyName i1.styleName = "Medium" i1.path = os.path.join(root, "instances", "NotoSerifTagalog-Medium.ufo") i1.location = dict(weight=500) i1.kerning = True i1.info = True doc.addInstance(i1) i2 = InstanceDescriptor() i2.name = 'instance_SemiBold' i2.familyName = familyName