6° + 6° NOT equal to 12°

Hi, I just discovered that slanting a shape 6 degress first and then 6 again gives a quite large difference from slanting 12. Can this be fixed or am I missing something?

Cannot reproduce. I get the same result. Two possible things:

  • What exactly is happening? Do you get the same shape but a different position? For slanting, the transformation origin is important. If you have it centered for example, the transformation origin will likely be different every time when you do multiple slants.
  • Or are there small differences in the details? Grid rounding may have an intermediate effect.

On a font with 1000 UPM.

I slant from left to right, origin point left bottom corner.

I always get 2 units difference. You don’t? Probably the grid who does it…

test.glyphs (8.1 KB)

Seems to be a rounding error, yes. But I can reproduce it only when I try to slant it back to vertical.

So you can not reproduce it when slanting normally? :flushed:

That is indeed weird. Something is wrong with me… or my version.
I don’t use the cutting edge, could this be some lead? I and pretty sure this has worked previously. See movie.

testmovie.mov.zip (3.7 MB)

Try with disabled grid. (set the Grid Spacing to zero).

Same problem. To be honest, this is problem I can live with, but would be so super if it matched :slight_smile: and I think it might have been 100% before, not sure exactly, but this is the first time I reacted on it.

I can reproduce the problem now. There is something going on with the math that I need to better understand.

It’s geometry, folks!

This boils down to 2 tan(𝛼) ≠ tan(2 𝛼) for the general case.

So: this is not a bug in Glyphs. In one scenario, the x value of each point is shifted by tan(6°) y twice, i.e. by 2 tan(6°) y while in the other case they are shifted by tan(12°) y.

To achieve an overall slant of 12°, after having already slanted by 6°, you need to slant by inv_tan( tan(12°) - tan(6°) ), which is about 6.133°.

16 Likes

Thanks for the explanation.

I don’t understand even a small portion of this, but trust you know. Would it not be a point if Glyphs adjusted for this, or would that mean problems somewhere else? I think most people think that 6 + 6 = 12 :slight_smile:

This adjustment should definitely not be done silently. If I ask to slant by 6° I want exactly that to happen.

Since Glyphs knows the current slant/italic angle (and assuming it is set correctly by the user), it could offer to enter the target angle in the UI as an alternative to entering the actual slant angle.

I agree with Tim; I prefer accuracy (I still don’t like that scaling % thing on the Palette, nudge nudge).

I think more extreme cases like 45° × 2 should help you understand the logic better.

1 Like