Rebuild component glyph

Does anyone have a favourite way (script or something I’ve missed in the UI) for rebuilding a component glyph from its components?

For example, if I have an /Aacute, and I add a new master to the font, I can either copy and paste the /A/acutecomb from a different master into the new master, or I can delete the whole glyph and re-add it, which will add the components to each master. But to do that for all the glyphs with missing components is a big deal. Has anyone automated this?

Edit: Bah, it’s mekkablue’s Copy Layer To Layer, isn’t it? Forgot about that one. Never mind.

It doesn’t work with OS X 10.12.6. Rainer said it needs a major rewrite.

Or press Cmd-opt-shift-C. Glyph > Make Component Glyph rebuilds the selected layers with their default compositions.

I have an fl-ligature which is just an f and an l, decomposed.
When I type Cmd-opt-shift-C the shapes become components of f and l, but the width of the whole glyph changes.

When I use the Rebuild Components in Place script, the l is positioned on top of the f, with a bit of X and Y-offset.
In the script I find no author, but it says “Tries to position the accents as precisely as possible.”

In another glyph, this script replaces a commaaccent with a cedilla.
I think that script is buggy, it should either match exactly, or do nothing.

I found it in an old folder to which I added “mekkablue” to the name. So he is likely the author @mekkablue

The script was written for a special purpose and updated only once or twice. You are probably the fourth user of it ever. It takes as components the defaults from GlyphData (which is cedillacomb in the case of Tcedilla, I guess that was your case?), and places them above the center of the outlines it finds. It does not compare shapes. If you do not like the defaults, you can change your GlyphData accordingly.

I think I never tried it with ligatures, its original intention was to rebuild diacritics with the proper components but without automatic alignment, as a first step in reconstructing a file. I think I once added support for fractions because someone needed it, i can try adding ligature support.

Thanks Rainer,
I find it a bit scary that you keep track of how often scripts are used :slight_smile:
And I found more problems, b and d with dotaccent receive their component dot in the middle of the bowl, very much not in place.
How I used it: I selected a bunch of glyphs that should be composite and let the script run.
I had assumed the script would look at actual point positions, search through the font for a compatible outline, and compare coordinates before and after. It is fine to start with components as described in GlyphData, but please only when their shape matches. And in my case it was not the cedillacomb - which sounds like an English product for French hairlines - but a normal cedilla, which is the official standard name for the standard cedilla. (T with a cedilla below was a mistake from the Unicode Consortium, nobody on our planet needs it, only T with a commaaccent is for real.)

If there is only one glyph that changes appearance, I tend not to trust the script at all.
I suggest that if no component can be found that fits within tight margins and can be positioned exactly, that the script just leaves the path as outlines.

Shape analysis is possible, but that would be a very different script. I do take commissions, but I guess it would not be worth it.

Don’t worry, I have no means of keeping track really. It is just that the script purpose is very specific, and every time somebody uses it, he/she will need a tweak, and I get a GitHub issue or an e-mail.

The ‘standard’ cedilla is also just a historical accident. It should not exist at all, and is only there for backwards compatibility with older encodings. I have never seen a language in which freestanding, non-combining cedillas have been in use. Before computers (or electronic typewriters), that is. But I digress.

I talked to Romanian designers and found that there are two schools of thought about what is the lesser evil. I summed them both up in the tutorial. But again, you can change your GlyphData easily.

Hm, I think we should assume that locl is working in 2019 and ditch the 2nd school of Romanian thought.

Having accents as a freestanding, spacing shapes makes perfect sense when you are a type designer. I don’t like non-spacing accents and hacks to make them spacing temporarily. I think combining zero-width accents is the real historical accident, they are a pain in specimen production, they will position wrong without extensive anchoring, and composite glyphs can just as easily be built with spacing accents. If you typeset Mah, with a font that has no Mah glyphs, it’s easier to combine a spacing cedilla with the LMNO glyphs than a none-spacing cedilla, which would need just as much kerning and fumbling, but can’t be properly selected.

In FontLab 5, I can choose Contour > Convert > Selection to component, which finds an exact match, keeps exact position, or creates a new base glyph if no fitting component can be found. But no stress, I don’t need the script, I still have the source with components, and just thought that Rebuild Components would be faster than finding and converting the source.

And of course I was joking about monitoring script usage. We are not that far yet, but it will come, Adobe is already monitoring my font usage.