Side-bearing arithmetics and negative numbers

Hello there! Just starting out using Glyphs and so far everything’s been a breeze, thanks.
I’m playing with side-bearings arithmetics and love the idea of everything being relative to H/O etc. However, if I have negative side-bearings, Glyphs seems to be unhappy (the formula is highlighted in dark green).

Something like =-0.01 * H yields a positive number instead of a negative one so it looks like Glyphs doesn’t handle that very well. I tried different ways to get negative numbers through a formula involving another glyph without luck. Am I missing something? Is there a special syntax?

Thanks,
Mathieu

You want to derive a negative number from a positive sidebearing? Why not set a negative number?

Yes, exactly! Setting a negative number works, but it was in the interest of keeping everything relative to the side-bearings of H and O, using them as reference to work on the spacing. I’m very much a beginner when it comes to spacing, but I thought the idea was appealing, keeping things proportional instead of using hard numbers. Is there a technical reason why it’s not possible?

What do you expect as outline from the mentioned formula?

It might be tempting to try to set up everything with formulas but I would recommend to only use formulas for related shapes.

It’s for an uppercase geometric Y where I’m looking to get -6/-6 as side-bearings. My H side-bearings are 60/60, so I would expect =-0.1 * H to yield -6. Of course you’re right, Y has little business referencing H but it’s still early days for the typeface and I’m playing with loose/tight spacings, having only one number to change is pretty handy to get an immediate feel before setting down to “hardcoded” values for the unrelated glyphs. Hope that makes sense!

I am afraid it does not. Suppose you want your spacing looser, so you change the sidebearings of H from 60 to 100. The Y sidebearings would go from –6 to –10, which is not looser, but tighter.

In 99.99% of the cases, establishing relationships between sidebearings does not work with percentages, but rather with adding and subtracting absolute values.

Right, I see your point I think. However, doesn’t the side-bearings of Y need to be tighter because the general spacing is looser? If you want the type to be looser you’d still want the Y to have a negative side-bearing (in my case) so it compensate the white space even further? Alternatively, would it be possible to reference the bounding box width (BBW) of the current glyph to say something like =-0.05 * BBW? It’s my first time spacing a font so happy to be taught the ropes, I just liked the idea of having as little absolute values as possible in there to keep things flexible whilst the font is still a work in progress. Happy to be proven otherwise :slight_smile:

I understand what you are trying to do but I still would not advice to do it. When you change the general spacing, the Y and other like this usually don’t change.

If you want Y to keep a negative sidebearing in any event, it really makes no sense to relate its sidebearing to other (positive) sidebearings, much less so through a multiplication. And a negative factor is especially counterproductive. Multiplication would only make sense if the shapes of your letters would change, additionally to the spacing change, but they don’t, I assume. Try relating sidebearings with addition and subtraction. And only relate similar shapes with each other.

Thanks both! Appreciate the advice. Will keep on practicing.