Decompose Glyphs Before Transformations

I’m hoping to decompose glyphs before slanting them in a instance-level custom parameter, to prevent slant transformations from compounding on one another (first slanting idotless, then slanting i with the already-slanted idotless). Maybe I’m getting the order of operations here wrong, but my thought is with the following custom parameters:

  1. Decompose Glyphs a, b, c, d, and every other glyph
  2. Filter Transformations;Slant:8;SlantCorrection:0;

Glyphs should decompose each glyph, then slant each glyph’s paths.

But Decompose Glyphs doesn’t seem to do much here, and I’m still getting compounding transforms. I saw elsewhere in the forums that Decompose Glyphs takes a list of glyph names. Does it matter what format the list is in?

I wondered too if this is just a bug (in previous versions of the 2.4b I don’t think I even had to decompose glyphs before slanting via custom parameter).

It is possible that Filters are still executed before the Decompose Glyphs parameter. You can try a filter that calls LayerGeek with decomposeComponents, and then drag the filters in the right order.

The Decompose Glyphs parameter is applied before the Filters.

I made a minimal test case using both LayerGeek and Decompose Glyphs. Neither are working as I’d expect. Am I using the wrong syntax? Maybe I just have the wrong expectations?

I attached the sample file for reference.

customparametersbug-Italic.glyphs.zip (3.1 KB)

Is this problem only in the preview at the bottom or also in the exported font? The preview does not take all filters into account.

Ah you’re right! It’s only the preview that has this behavior. In fact, I don’t seem to need Decompose Glyphs or a LayerGeek script to get the (exported) result I’m looking for.

So I can export a font just fine, but I’m not entirely sure why the preview behaves this way / don’t remember this behavior coming up in previous 2.4 builds. Is there a way to force the preview to show interpolations as they’ll be exported, for example?

It does show the interpolations, but not all filters. That is because that would slow down the preview significantly. Then it’s faster to use the Adobe Fonts folder.

That makes sense. To clarify one thing, with the following two scenarios:

The transform filter works fine in the edit view, but not in the preview of the custom parameter with the same options. Is this because the custom parameter applies the filter recursively in the preview? That is, does it apply the transform to the d character, then apply the transform to the _part.bowl and _part.bowlInset components within the d?

I downloaded an old 2.4 build (933, as I couldn’t find build 934 or newer at updates.glyphsapp), and this does indeed work there.

The instance preview in the info window is actually processing the transform twice, but the preview pane in the edit view is working as expected, which is what matters to me here.

@mekkablue There is an issue with this in v2.4.4-1075, but only when exporting TTF files. Take a look at /p/parenright and a few others in the attached file after exporting as TTF. This appears fixed as of 2.5b-1084.

However, 2.5b-1084 also has a problem reading/displaying TTF files (all components show up as “no base glyph”) – but this is only a display issue, as far as I can tell, because the TTFs seem fine in other apps (in both system tools like Font Book and other editors like RoboFont etc)

Barlow.glyphs.zip (148.4 KB)

I have fixed the reading of components already.

Edit: Update is up.

How can I decompose all glyphs without adding them all in the value field? Leaving it blank didn’t work.

Not sure I understand what you mean. What do you want to achieve?

I suppose I have the same question as @otherviews, meaning how to decompose all glyphs without specifically listing them (i.e. A, Aacute, Abreve, Acircumflex, Adieresis, Agrave, Amacron, Aogonek, Aring, Aringacute, Atilde, …). I am thinking of a similar fashion as the Filter parameter, i.e. using include/exclude?

Thanks!

as in LayerGeek; decomposeComponents filter?

Yes, exactly. Am I right to assume the Layergeek decomposeComponents filter is not previewable via the Instance Preview panel?

Basically I am looking for a way to flatten all glyphs before running a LSB/RSB Transformations filter on an instance to make spacing glyphs easier.

use PreFilter (instead of Filter) if you want to see it in the instance preview

@ghost Thanks. Still not working for my use case though: decompose glyphs like n (made of _stem and _shoulder components) before applying Filter “Transformations;LSB:-25.0;RSB:-25.0;”

There should be a tiny gap between “nn” (same as between “ll”) if the decomposing works.