Kerning below the baseline

Post Reply
User avatar
SCarewe
Posts: 100
Joined: 23 Apr 2021

Kerning below the baseline

Post by SCarewe »

Hello, I am coming across an issue more and more concerning the specific combination g, – KO wants to add a ton of positive kerning between g and comma, which I can understand if the shapes below the baseline are considered the same as the ones above. Tightening this as a model gives KO massive problems. What is KO's logic here? I can only assume that the area below the baseline is treated equally to the area above, so KO is trying to keep the same kind of tightness all around. I want g–comma to be a lot tighter, though, in order to minimise the white space in within the x-height.
Attachments
Screenshot 2021-10-21 at 16.05.56.png
Screenshot 2021-10-21 at 16.05.56.png (49.54 KiB) Viewed 4095 times
User avatar
Tim Ahrens
Site Admin
Posts: 404
Joined: 11 Jul 2019

Re: Kerning below the baseline

Post by Tim Ahrens »

Thanks for raising this topic. Kerning below the baseline is given special treatment internally, although I have never explained this publicly.

When analysing the shapes, KO first does so disregarding the baseline, and, in addition, with shapes below the baseline and above the x-height given almost no impact. Then, based on the models, it determines where in the spectrum between these two extremes the user wants to be, and applies this principle during autokerning, of course.

This principle of giving the shapes below the baseline and above the x-height less weight is applied to LC-LC kerning. In pairs with UC or between punctuation, it is skipped entirely, and in kerning between LC and punctuation it is applied with somewhat more than half the impact. This is a hard-coded value, maybe I need to increase it?

What happens if you set a smaller value for g-comma? I assume it removes a model, first g-comma itself and then another model if you try again? What is the contradicting pair KO can’t get to work together with a tight g-comma?

Note that the “almost no impact” tweak as mentioned above is implemented somewhat differently in the latest version (1.04). Maybe we are lucky and it works out better for you?
User avatar
SCarewe
Posts: 100
Joined: 23 Apr 2021

Re: Kerning below the baseline

Post by SCarewe »

Hello! Thanks a lot for your detailed explanation, that's very helpful to know! I tested again with 1.06 and I still run into the same issue. If I set g-comma to something that looks decent to me, the contradicting model is mentioned to be n-comma. The threshold below which KO decides to kick out one of the models appears to be a lot closer to my taste than before, now, though. It isn't that far off anymore. Thank you!
User avatar
Tim Ahrens
Site Admin
Posts: 404
Joined: 11 Jul 2019

Re: Kerning below the baseline

Post by Tim Ahrens »

The effect of ignoring shapes below the baseline, even if applied to full extent, does not start immediately at the baseline.

It’s not like erasing any black shape below the baseline (although that would be easier to code):
below-baseline-erased.png
below-baseline-erased.png (21.47 KiB) Viewed 4056 times
Instead, imagine the black shapes being bent away from the opposite glyph (practically like slanting), starting at the baseline:
below-baseline-real.png
below-baseline-real.png (27.79 KiB) Viewed 4056 times
This is why the lower bend of the g, and the part of the comma below the baseline, still have some effect. I believe this is how it should be, as the baseline should not be treated as a hard border for this purpose.

Btw, did you take any measurements? For example, the distance between n and comma, and the distance(s) between g and comma. Our vision tends to be inaccurate and flawed, and sometimes when I find KO does something strange I get curious and simply measure a handful of distances, and often I am surprised about my misjudgment of distances. Of course, there are certain visual effects going on that tweak the pure geometric distances (that’s why kerning is so complex) but there are limits to the extent of these effects.

If you want you could send me the file, with the g-comma set as an independent pair according to your taste, and then I can get a picture of what is going on.
Post Reply