Re-opening file shifts all layers to the right


Hello, I have an extremely annoying issue I am bumping into. I was working on a file, fixing paths and alignments, and suddenly, all my layers with metrics keys are out of sync, so I check what’s wrong and find that all paths have been shifted (I think) 8 units to the right. Sometimes 6, sometimes 7. I don’t save the file, re-open it, but it’s still the same.

Using my VCS I can revert the file to a state where everything was correctly aligned, but when I re-open the file, without an error message or anything, everything is misaligned.

What in the world could be causing this? I have disabled all plugins.

Okay, I seem to have found where the issue arises: It has something to do with metrics in the masters.

First off, I am working in an italic file.
The original file has the Metric “sc-Height” defined, with the Metric type “x-Height”. Scope is set to “Case: is Small caps”. If I set the type to “Other”, save the file and re-open it, all my smallcaps get mis-aligned (pushed to the left now).

Even worse, if I remove the scope “Case: is Small caps”, all glyphs get shifted.

Is there any way I can change the Metric type to something else without screwing up the whole file?

Quick shoutout to VCS and .glyphspackage file format for allowing such detailed file history management, it is a real life saver!

Are you sure the outlines are shifted? Adding a custom x-height can result in a different italic bounding box shifting.

The problem is that the original file has two Metrics defined at x-Height. One at the real x-Height, and one at smallcap height. When I change the type of the second one to “Other”, the small caps get shifted. Whether the paths get shifted or the bounding box I don’t knwow, does it make a difference? The metrics go out of sync, in any case.

The x-height is used to calculate the slanting point for the bounding box that is used to calculate the side-bearings. So changing the x-height that is used for a layer will change the side-bearings.