Glyph / Component Placement in ccmp features

Hello, thanks for looking.

I’m using ccmp (one-to-many) substitutions to generate some glyphs in my font. The letters and components all have matching anchors in Glyphs app just like what you would have to compose any letter from components.

The anchors all work as expected if I simply place a component in into a letter in Glyphs App.

The one-to-many ccmp substitutions work as expected when the font is exported and used in Adobe InDesign with the “World-Ready-Composer” activated.

However… The anchors set in Glyphs are ineffective at controlling the placement of the components. I get the substitution but each glyph/component is simply placed in line as if they had each been typed as a separate character, the full width of every glyph/component is included.

I’ve been toying with this experiment for some time and I’ve seen a lot of code samples that seem to include anchor names and locations in the actual feature code. Unfortunately I’ve not been able to hack that together myself & I’ve not been able to find a good section of the manual or a tutorial from which to learn how this works.

Any clues, links, code samples would be greatly appreciated.


can you give some examples on what glyphs you have as components, and what category/subCategory they have?

Hello Georg

It’s very simple but for example, if I have…

A,, _A.btm-flrsh (one letter & two components)

… and I do something like:

sub A.init’ by A,, _A.btm-flrsh;

I get the substitution but the two flourish components just come in sequence, after the A. I gather that the anchors set in glyphs are having no effect in the exported font and that I need to write the anchor locations into the feature but I don’t quite get how… or I could be totally confused. Any help would be great.

You need to set the category to “Mark” and the subCategory to “Nonspacing” for those glyphs what should attach.

World-Ready Composer does not support mark-to-base for Latin. Generally, it is a bad idea to test in InDesign. Can you try Font Goggles or a web browser? If it works there, you know it is an InDesign bug.

Excellent Georg and Mekka, thank you.

I just downloaded fontGoggles & I’ll try the advice about category & subcategory. Am I understanding correctly that the anchors set in Glyphs App “should” control the positioning correctly if I have the components set as non-spacing marks?

Thanks, setting the category and subcategory to make the components into non-spacing marks did solve the positioning issue. I’m still trying to ascertain for sure whether the anchors are controlling positioning or whether the components are just appearing in the position that they’re built in.

I’ll make a test version that will allow me to figure that out. I should be good either way, though it would be better if the anchors worked.

Any insights on the anchor positions that I’m seeing in feature code? it looks something like this…

feature ccmp {
lookup A {
component left-flourish;
component right-flourish;
component btm-flourish;
position {
x = 0;
y = 0;
anchor left-flourish-anchor left-flourish{
x = 50;
y = 50;
anchor right-flourish-anchor right-flourish {
x = 150;
y = 50;
anchor btm-flourish-anchor btm-flourish {
x = 100;
y = 0;