When 2 masters have different metrics key (equation)

If I have 2 masters, and I have 2 different metrics key equations, an interpolated instance shouldn’t inherit either of those equations. Which currently a generated .glyphs instance does…

And because the metrics keys are not applied automatically, that doesn’t do anything. But I have a look.

It matters when I add that instance back into the master file and then it reports that the metrics are out of sync

But then they are out of sync anyway because the metrics one the interpolated instance will be partially based on the layer keys.

How does that work? I’ve just observed instances like the following:
if i have for example
master 1 lsb: ==c+5
master 2 lsb ==c+8

the middle instance ends up being something confusingly not synced, but perhaps it was that it became “c” (possibly was a glyph metric key before instead of layer) and the interpolated metrics is not the same as c

I this not easily solvable. There are so many cases to consider that is will fail one way or the other.

I’ve encountered the same issue when importing an instance as master. I often select large numbers of glyphs in the font view and reapply metrics keys via the keyboard shortcut to make sure any spacing changes filter down.

This ended up messing up my spacing on the new intermediate master, since I was applying the keys unaware that they weren’t interpolated.

I couldn’t find an existing script for this, so I wrote one based on @tribby’s “Brace Layer Side Bearings Reinterpolate” script that reinterpolates only the side bearings, then updates metrics keys accordingly for selected glyphs on the active master:

I’m not very experienced with scripting so it is most likely poorly written, but it’s been working for my purposes so far and could be of some use.

1 Like

Thank you for this! I have been looking for something that will reinterpolate only sidebearings!

You’re welcome!

It can handle most glyph names right now including small caps, hyphens for language extensions, and properly deals with cases when the ‘|’ is used on a key; beyond that I haven’t tested it extensively. It currently references the bolder adjacent master because that’s what I needed, but you can just change the masterIndex in the script to suit your needs.

Also, just a note, the script reinterpolates the intermediate master selected in the top left corner of Glyphs App, not based on the layer selected in the panel on the right.