Script/feature wish: convert outlines into components

I wish there is a script which can convert outlines of selected glyphs into components if such components exist in a font.

Example: I open an older decomposed font, select all accented letters (á, ö, ñ, š…) and the script will replace outlines with components while keeping the position of the elements and keeping the metrics.

It is a combination of two existing features. “Make component glyph” combines right components but ignores the original position of accents and original metrics of a glyph. “Component from selection” can convert outline into an existing component, but it requires me to convert each object individually, glyph by glyph.

The script should use the same algorithm as “Make component glyph” to identify correct component (it has to build á from a + acute and not from a-cy + acute) and it should only replace outline with component if they are identical.

The reason for this script: I often modify existing decomposed fonts. I prefer working with components. But at the same time I have to respect the original placement of accents (that’s why I can’t use anchors). I have such script for FontLab but as I switched to Glyphs, I would love to have this functionality again.

Mekkablue, couldn’t you help me?

Why don’t you port the FontLab script?

Unfortunately I am not familiar with Python and programming. I can share the code with you if you’d be interested. Maybe it’d be easy to port it. Thanks for your reply.

My mail: res at this domain.

I’ll think about it.