Bulk-renaming kerning groups

Hello, I want to bulk-rename my kerning groups (in this case, remove a particle from all kerning groups) in a .glyphspackage file. Instead of going into the kerning table, double-clicking a kerning group, renaming, then selecting “Rename” in the warning popup, I would like to solve this more efficiently.

In a .glyphs file, I can simply open the file in a text editor and find and replace. This does not work for .glyphspackage files the same way. Any pointers how to do this? Either via script or via a similar method with a text editor? Many thanks!

Two options:

  • Save it as a .glyphs, do the renaming and resave it as .glyphspackage.
  • Open the package in TextMate. It can handle search and replace in a folder files quite well.

Great, thanks. Can you outline an idea how to implement this in a script? As in, find x and replace by y in the kerning table?

I was using Sublime Text to edit the glyphspackage. In which file do I find and replace? Do I find and replace in fontinfo.plist and for all glyphs in /glyphs?

Why take chances? In the whole folder.

In a script you would just have to go through GSFont.kerning (and perhaps RTL kerning as well) and iterate through GSFont.glyphs. That’s it. The file type does not matter for this.