Finding duplicated outlines

Do we have a script that will check a .glyphs file and report on any glyphs that have a duplicate set of outlines in the same cell?

I discovered that I had inadvertently copied a glyph over itself in two instances so I’m concerned about finding any others.

Don’t they disappear by themselves if you check Remove Overlap?
I can add that test to the Preflight script

Hmm. I hadn’t thought about that because in my mind Remove Overlap pertains to two overlapping visible shapes. I can certainly test that.

[EDIT] Indeed, it does get rid of the duplicate. Thanks for that tip, Rainer.

So simple. Those are the ones I don’t think of. :slight_smile:

It is usually not a problem at export (could be though in complex nestings), but if you want to clean up your .glyphs file, I just added a Delete duplicate paths script to my repository, look in the Paths subfolder:

Many thanks, Rainer.

My main concern about duplicate paths dates to Type 1 font days. A duplicate path directly on top of another could basically “zero out” the character, i.e. all that displayed during use would be an outline, a very thin one. I recall finding that on one Adobe font. That may not be an issue with Opentype fonts though.

I’m sure I would have caught such a problem during testing, but one never knows.

The Remove Overlap function (Glyphs uses the one provided by the AFDKO) has been much improved. I also remember weird results in a, cough cough, different font editor, back in the good old days.

But sure, stacked paths can confuse the Correct Path Direction function, and they can be a nuisance during editing. Thanks for the script idea, I credited you in the update description. :slight_smile:

Thanks Rainer.