Component update and filter like for metrics

Since the introduction of the file opening check that syncs component glyph positions I was wondering if the same functionality could be made available as a sidebar filter and glyph menu function, equal to metrics checks and syncing (and ideally expose this also as API method).

Best,
Johannes

What exactly should it do?

The filter should highlight those glyphs that would be affected by the “startup sync” and the method would perform the same “startup sync” for selected glyphs.

The filter can’t do that after the fact. And the sidebar filter can’t know what glyphs where effected by the startup checks.

Why couldn’t this filter work the same way as the metrics out of sync check? The fact that the check happens at startup right now is irrelevant to what I’m proposing. What I’d like is for a way to check those things are in sync in an explicit way other than to reopen a file.

This is not how it works (currently). When you set the checkbox in the dialog, the components are hard set no not align. The filter would need to copy each glyph, record the component positions, enable alignment and align. Then check the positions again and compare to the previous positions. That is not something you do on the fly all the time.

Right, I see. Could the filter just be a check for glyphs that contain automatically aligned / not automatically aligned components? Supposedly that is just a boolean that would be inexpensive to check. So I could filter all glyphs that have components that don’t automatically align, and hit the sync button when desired, e.g. a manual “sync/enable/disable component alignments” like function for syncing metrics in the Glyph menu?

That is possible already. There is a “Is aligned” filter property. Set it to “No” and combine it with Count of paths == 0 and count of components > 0.

2 Likes

I tried this today with opening an older file to see if those match up, but there is something else still that the startup sync considers.

Opening the file I get notified about 4 glyphs, however the filter as described above finds a whole bunch more, for example letters I deliberately included as unaligned component. An additional check against No metric key helps, but still will also show unaligend component glyphs that have just explicitly set numeric metrics value.

After the file is opened (with or without checking the boxes in the start dialog), there is no way to know what glyphs where effected. That’s why I added the option to open a tab with all affected layers.

I’m not sure we are talking about the same thing.

When you open the file there is some logic that determines those glyphs that are suggested for updating. I am inquiring about exposing that same logic, either as filter, or as press-of-the-button.

We are speaking about the same thing. The changes to the alignment on opening the file are happening because Glyphs changed the algorithm. So once the change is done, it can’t be triggered again.

Ahk, thanks for explaining in such detail. I think I am just utterly confused about this alignment check now. I have a file I’ve been working on for months, why would the app ask me repeatedly to update alignments even though I already updated them once?

It should only ask you once. Could you send me the file?

What I mean is over the last weeks and months it has repeatedly asked with the same file.

That should only happen when you use a newer version. And you only should see smaller movements?