Method for copying kerning from class to class?

Working on a file that already have kerning defined, I wanted to rearrange the kerning groups:

Instead of one @a class with exceptions for colliding accents, I want to have one @a class and one @a-accents class. I am also doing the same to other classes – i.e. @o will be split in @o and @o-accents. Is there a way to copy the kerning pairs from @ n to @ n-accents?

Interesting, I had a similar idea some time ago. Best way to do this is a script.

Hmm. I found Toshi’s Copy Kerning Pairs script. It gets me halfway there, but won’t suffice when I have multiple split classes. If I copy the @a pairs to @a-accent, and the @h pairs to @h-accent, I still won’t have any kerning between @a-accent and @h-accent.

That would be more than copying, that is actually creating new kerning.

Yes, it multiplies, now I remember that was one of the reasons I abandoned the idea again. That, and that it is hard to keep up to date. E.g., if you change something in a-h, then it is not clear if the change should also trickle down to a-hAccents, aAccents-h, and/or also aAccents-hAccents.

Hmm. Now I am confused. This is hard to wrap my mind around. Say my kerning table reads:

pos @h @a +10

I copy pairs from @h to @h-accent, so now the table reads:

pos @h @a +10 
pos @h-accent @a +10

Then I copy @a to @a-accent, and finally the table reads:

pos @h @a +10
pos @h @a-accent +10
pos @h-accent @a +10
pos @h-accent @a-accent +10

Would this work, or am I missing something? If so, I can use Toshi’s script.

I am not worried about keeping it up to date. I have the kerning already, I just want to split the classes.

Have you tried using MetricsMachine for copying kerns? That’s how I do it. Export a UFO, makes changes in MetricsMachine, import the new metrics data back to the .glyphs file.

Thanks. That is probably a better suited tool for the task.