Please allow over-defined sidebearings

I’d like to set the RSB, LSB and advance width of my minus to “plus” because this is simply what it needs to be. That way, I could easily see if something is wrong by looking at the “Metrics keys out of sync” list filter, which I periodically check. A bit like an assertion in a computer program.

It seems Glyphs rejects this because is practically over-defines the RSB and LSB? To me, that’s not necessarily a problem.

The question is: What is the sidebearing/width formula system supposed to be?

  • Is it a way of defining what you want, then have a feature to check whether this is fulfilled, and then possibly have an option to manually-but-conveniently fix things where possible? This seems to be the current implementation. It means allowing over-defined sidebearings would not contradict the system.

  • Is it a a set-up-and-forget system that always guarantees the requirements are fulfilled? Then Glyphs would have to auto-update (unlike now).

1 Like

The current system, by not allowing over-defined formulas, allows Glyphs to fix the metrics by the click of a button or menu command. If all three metrics – LSB, RSB, width – use keys, then Glyphs could no longer offer such a fix action since it is not clear which of the three metrics is in violation of the design indent.

In your case, that is not an issue since you just want the validation, not the fix action. So I can see a possible system allowing over-defining formulas at the cost of the fix action. Maybe such a system should be separate from the current metrics keys as not to confuse why some out-of-sync situations can be fixed by Glyphs and some cannot.

For which glyphs would you use such a validation system?

Not quite.

If I specify the advance width and one of the sidebearings as =| then Glyphs cannot auto-fix the problem if the width of the shape is even but not the given advance width (or vice versa). The sidebearing formula will remain red after auto-fixing the metrics. So, this becomes more of a warning mechanism than an auto-fix.

Also, I often encounter cases when selecting all glyphs and applying “Update Metrics for all Masters” once does not eliminate all mismatches. I got used to doing this 4–5 times because it doesn’t work instantly (nested/chained conditions) and have encountered case when I had to use that command 10 times.

So, right now, we’re not at a stage where we can consider this “automatically fixing”.

It can be done. The menu command will only apply two of the keys (probably Width and LSB) and ignore the third.
I’ll think about it.

Instead of “Update Metrics for all Masters”, I’d love to have a command “Update Metrics for all Masters for all layers for all glyphs” that guarantees that no blue triangles remain. Once we have that feature I’ll accept that Glyphs refuses over-defined sidebearings.

The Metrics Solver plugin does that. After it is installed, choose EditResolve All Metrics. It operates only on the master layers, not backup layers or alternative/intermediate layers. So that could be added to the plugin or it itself could be included in Glyphs.

Metrics Solver looks good! It doesn’t seem to be ready for Glyphs 3, though?

Sorry, I haven’t answered that one. I was just working on math symbols and thought it would be convenient if I could specify the LSB, RSB and width of the minus as “plus”. Of course, if that’s outdated and needs to be fixed then one would have to change the width of the minus shape itself, which is probably beyond the scope of automation.

Works for me. Does it not show up in your Edit menu?

So if such an over-define feature would be added, you would not want it to be affected by a global update out-of-sync all masters/glyphs/layers action and instead stay out-of-sync for manual inspection?

Oops, yes, now Metrics Solver works in G3.

Yes, I guess those over-defined metrics would act more like an assertion. In recent years, I found assertions to be incredibly useful when programming. Maybe there are other things in type design and font engineering where assertions could be useful?

6 posts were split to a new topic: Using constraints and assertions for font production

I removed the limit of two metrics keys.