Backup layers (associated with one the same master) to masters

Hi. I exported my old Fontlab file to Glyphs format. There are two masters and two backup layers. I need to make a masters from those backup layers by keeping only Regular stroke and Bold stroke like:

  • Regular stroke → Regular
  • Bold stroke → Bold

Screenshot 2024-11-22 at 4.30.24 PM

But for some reason Bold stroke isn’t associated with Bold so it’s hard to use available scripts like this one. Maybe someone has ideas on how to do it in this case?

@GeorgSeifert I also tried to manually right click Use as Master on backup layer, but it works only for one glyph, and when I select more than one glyph I can’t see backup layers anymore (however all selected glyphs have that backup layer) and focus moves to associated master (Regular). Does this command intended to work with multiple glyphs?

You can write a small script to move all “Bold stroke” layers below the “Bold”.

boldMasterId = Font.masters[1].id
for glyph in Font.glyphs:
    for layer in list(glyph.layers.values()):
        if layer.name == "Bold stroke":
            layer.associatedMasterId = boldMasterId

I don’t think that is doing what you want.

No.

I see, the idea is reassociate Bold stroke with Bold, that’s what I thinked about too. Thank you very much!