Hi, I try to sync the metrics keys in the exported UFOs. I have a “virtual” font which comes from `Font.copy()’ right at the very beginning. All other things I do to this copy work well (for example deleting a lot of glyphs) and only apply to the copy and not the real .glyphs file (exactly as I want it.
However, when I try to sync the layers in the virtual font, they a) are still not in sync in the exported UFO and b) my actual font suddenly shows some glyphs with the darker background in the font overview (meaning that they changed). This is kinda scary, I don’t want ANY changes to the original font. But I want the sync to happen to the virtual font.
for glyph in virtualFont.glyphs:
for layer in glyph.layers:
layer.syncMetrics()
When I make another copy of the already copied font like so: virtualFontCopy = virtualFont.copy()
and call the code on this copy-copy, it at least leaves my original .glyphs file untouched. But the outcome still hast unsynced metrics keys in the interpolations.
Ah, I see. So the basic problem, that the exported UFOs got metrics keys that are out of sync when I open them in Glyphs will not be fixable?
I can flatten them in my script to the actual numbers. I just hoped it would be good to pass the information of the metrics keys on to the receiver. But I am not sure if they can see them anyway in RF
So I got a glyphs file with 3 Masters. There are metrics keys and they are in sync.
When I export the the 10 instances to UFO via a script and open the UFOs in Glyphs, the interpolated instances show the metrics keys, but they are red, out of sync, mainly off by one unit. This means, I have to sync all the metrics, and they effectively change in those glyphs then. I aim for the exported UFOs to have the proper values already. Apparently they get their values somehow. They show the metrics key and a LSB and RSB.
To make it even shorter: The same thing happens when I just “Generate Instances”. They are all out of sync as well.
I basically just want to sync them in the script before they are written to disk. But layer.syncMetrics() doesn’t have an effect.
I don’t think so. my koKai has 56 RSB and the letters that use it as a metrics key come out with 57. I want them to have the same as koKai RSB effectively. I got some glyphs that are symmetrical in the masters, using LSB: “=|koKai” RSB: “koKai”. In the interpolated instance now they got
LSB 56, RSB 57
but it should be
LSB 56, RSB 56
So if there is a rounding it seems to be not consistent. Or am I twisted?
I will just hit the sync metrics in the interpolated fonts for now. I just hoped there’s a way to not need to touch the export, since that is something you advocate for generally, I think Thanks for the quick replies!
The RSB is not interpolated but the result of rounding the rightmost part of the shape and the rounding of the width. Having consistent RSB is only making the designer happy, nothing else