Delete a glyph and decompose components with script

There is a method to delete a glyph from a font and also decompose all glyphs that used it as a component ?

Find all instances of a component in a font master with GSFont.glyphsContainingComponentWithName_masterId_(compName, masterID), and then decompose with GSLayer.decomposeComponents().

1 Like

Hugo is asking about a way to do this with scripting, not manually.

there is a (unofficial) method on the font that can help here:

font._decomposeComponentsWithNames_(glyphNames)

that will go through all layers in all masters and decomposes all components that point to a glyph in the list.

1 Like