LettError/MutatorMath

How to make manipulations with a single master?

Closed this issue · 2 comments

For example consider this designspace. I don't see any changes in output.ufo

<?xml version='1.0' encoding='utf-8'?>
<designspace format="3">
  <sources>
    <source filename="sources\light\LightCondensed.ufo" name="master_1">
      <lib copy="1" />
      <groups copy="1" />
      <info copy="1" mute="0" />
      <location>
        <dimension name="width" xvalue="1.000000" yvalue="1.000000" />
      </location>
    </source>
  </sources>
  <instances>
    <instance familyname="TestFamily" filename="instances\testOutput_glyphs.ufo" stylename="TestStyleName">
      <location>
        <dimension name="weight" xvalue="2.500000"/>
      </location>
    </instance>
  </instances>
</designspace>

I'm trying use the following script.

from __future__ import print_function
import os
import defcon.objects.font
import mutatorMath.objects.error
from mutatorMath.ufo.document import DesignSpaceDocumentWriter, DesignSpaceDocumentReader
from mutatorMath.objects.location import Location
import time
testRoot = os.path.join(os.getcwd(), 'data')
documentPath = os.path.join(testRoot, 'experiment.designspace')
sourcePath = os.path.join(testRoot, 'sources')
instancePath = os.path.join(testRoot, 'instances')
master1Path = os.path.join(testRoot, )
logPath = os.path.join(testRoot, "tests.log")
ufoVersion=2
roundGeometry=True      # this will trigger some fails if run with a pre-ufo3 fontMath.
doc = DesignSpaceDocumentReader(documentPath, ufoVersion, roundGeometry=roundGeometry, verbose=True, logPath=logPath)
doc.process()

With one master, you can only do scaling.

You are setting width, then requesting different weight. That can't work.