Automatic generation of `ccmp` sometimes does not work (but sometimes does)

Let’s say i like the macron mark, which i do, and i have an Amacron glyph. Works fine.

I also want to be able to have a one_macron two_macron and so on for all the numbers. That also works fine (once i added a top anchor to each number) in that Glyphs will correctly generate the composites with the Create Composite menu item.

It also, and slightly to my surprise, generates lookups in the ccmp feature: sub eight macroncomb by eight_macroncomb; (and so on). So now I can put U+0030 U+304 in the input and it gets GSUBd to /eight_macroncomb. Very cool.

I tried this with /S_macroncomb and Glyphs again correctly creates a composite with Create Composite, but it seems unwilling to generate lookups in ccmp.

If i add the ccmp feature and check Generate Feature Automatically then i get the lookups for the numbers, but not for S_macroncomb. I tried adding making the ccmp feature manually and using the “Automatic Code Placeholder”, but in that case no ccmp feature gets generated at all.

I can do the whole thing manually in another made-up feature xxdd and that works (at least in hb-view --features=xxdd).

So my question is: Is it possible to get Glyphs to automatically generate the ccmp lookups in the S_macroncomb case? Or alternatively is it possible to have a ccmp feature that is partly automatically generated and partly manually?

It seems that i can do a ccmp feature entirely manually, but that seems a bit tedious (even if i script it), and a bit dodgy, since i might miss useful automatic lookups that Glyphs would otherwise add.

I’ll look into the ccmp code.
But as long as those _macroncomb glyphs are composed from components, you don’t really need them. It would look the same if you typed letter/number + macroncomb and relied on the mark feature. There are no apps that support ccmp but don’t mark (any more).

yeah no; i mean, most fonts, yes; but, this font? no. Because it is mostly reversed out, so i need a subtractive process, not an additive one.

It’s the font mentioned in my blog article about kerning: Kerning, the Hard Way (also non-standard).

The actual font i am making is the result of taking the font made in Glyphs and post-processing it in Python. In principle i could do the base–mark positioning in Python, but i don’t.

Here, for example, is C_macronbelowcomb

There is no shaped macronbelowcomb that i can add to /C to get this.

I see.

What do you do in the post processing? The cutout could be done in Glyphs by using the mask setting.

yeah, i do a geometry subtract. The key part, for kerning, is composing into a single shape (that then becomes a new glyph) two glyphs drawn side-by-side as if they are kerned, and then subtracting that from the background stripes. There’s some splitting and cropping too. Done with fontTools and pathops (skia-pathops).

Is the mask setting described in the Handbook? [edit: yes, it’s here Graphic Attributes — Glyphs Handbook ]

The other thing the post-processing does is produce COLR v0 fonts, currently 19 of them (none of them use multiple palettes per font, and not all of them could).