silnrsi / smith

font development, testing and release
Other
14 stars 5 forks source link

Why does Master need to be in the source family name? #69

Closed devosb closed 2 years ago

devosb commented 2 years ago

Namdhinggo produces a range of weights Regular to ExtraBold instead of multiple RIBBI families. The text Master was removed from the UFOs as it is not needed, and the removal makes it easier to build the project with fontmake. Master was also going to be removed from the Designspace file, however, it seems to be needed in the familyname attribute of the source tag (lines 22 and 33 at the moment). If the text Master is removed from those locations, then the build with smith fails with the message

source not found: 'source/instances/Namdhinggo-Regular.ufo' in bld(source=['source/instances/Namdhinggo-Regular.ufo'], target='', meths=['process_rule', 'process_taskgens', 'process_source', 'process_tempcopy'], prec=defaultdict(<class 'list'>, {}), mappings={}, features=[], path=/dev/shm/fontdev/ci/limb/fonts/namdhinggo, idx=27, rule='psfchangettfglyphnames ${SRC} .tmp/Namdhinggo-Regular.ttf Namdhinggo-Regular.ttf', shell=0, tempcopy=[/dev/shm/fontdev/ci/limb/fonts/namdhinggo/results/.tmp/Namdhinggo-Regular.ttf, /dev/shm/fontdev/ci/limb/fonts/namdhinggo/results/Namdhinggo-Regular.ttf], _name='Namdhinggo-Regular.ttf[3]psfchangettfglyphnames', late=1, posted=True) in /dev/shm/fontdev/ci/limb/fonts/namdhinggo
jvgaultney commented 2 years ago

@mhosken Can we get this fixed ASAP please?

devosb commented 2 years ago

I think this is fixed in https://github.com/silnrsi/smith/commit/f27aedfbe3042e4fd1c589c22f0d39eb3675c4cb (which is on the manifest branch). This fix might require a change in wscript so I need to write up how to change wscript before the branch is merged.

devosb commented 2 years ago

Using Namdhinggo for testing, the fix that I mentioned seems to work. And the fix did not break the Namdhinggo project while the text Master was still in the Designspace file. So the fix in smith can deployed with out breaking projects. Once smith is updated, then the text Master can be removed, and a change in wscript is required.

cmd('psfchangettfglyphnames ${SRC} ${DEP} ${TGT}', ['source/instances/${DS:FILENAME_BASE}.ufo'])

needs to be

cmd('psfchangettfglyphnames ${SRC} ${DEP} ${TGT}', ['${source}'])

This type of change might be needed for other cmd() statements.

devosb commented 2 years ago

Closed by merging the manifest branch into the master branch, thus picking up the fix.

mhosken commented 1 year ago

The reason for needing to use ${source} is that with the introduction of build caching, ${source} isn't always ${DS:FILENAME} as was how things were before ${source} appeared. So if you keep using ${DS:FILENAME} you may be referring to the wrong file: an instance that doesn't exist, rather than the master.