Group-group-specific kerning rules

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

Group-group-specific kerning rules

Post by SCarewe »

Hello. I have come across a question that doesn't seem immediately resolvable to me with Kern On. For math operators, I want to set them to No Kerning among each other, so that no math operators receive kerning against other math operators. But I still want things like 7+7 to be kerned. So, ideally, for math operators, I would like to set a group-specific spacing rule of No Kerning against other math operators, but normal kerning against numbers.

Is this possible? Thanks a lot!
User avatar
Tim Ahrens
Site Admin
Posts: 284
Joined: 11 Jul 2019

Re: Group-group-specific kerning rules

Post by Tim Ahrens »

Agreed, sometimes it would be handy to specify things such as no kerning between certain groups of glyphs. Similarly, you may want special spacing between certain groups but not others. Right now, Kern On allows to have an individual special spacing value within one group, i.e. if both glyphs are from that group. For example, I want the superiors to have generous special spacing against letters but not within themselves. This is something that’s detected automatically of you set the models.

Maybe I should add a proper “special spacing manager” dialogue that allows to set these things in detail?

For now, a work-around for you would be to generate all math-math pairs via a simple script, and then set these pairs to independent zero pairs. Not an elegant solution, though, I have to admit.
User avatar
SCarewe
Posts: 73
Joined: 23 Apr 2021

Re: Group-group-specific kerning rules

Post by SCarewe »

Hello, thanks a lot for your thoughts. A special spacing manager would be great for (optional) granular control. The automatic detection works very well so far, but for cases like the one outlined above, more specific controls would be very useful.

I will try your suggestion, for the time being, it's a decent, simple solution.

Thank you!
Rosalie
Posts: 2
Joined: 21 Nov 2022

Re: Group-group-specific kerning rules

Post by Rosalie »

Hi
Downloaded and bought the app today, so still a newbie.

I have similar cases; I don't want to kern punctuation with numerator etc, if I remove the kerning pair between five.numr and period, Kern-On wants to remove a lot of incompatible models with that pair that are actually correct, and can't do anything until I close and reopen the app. On the other hand, it doesn't want to kern dnom and numr figures with the fraction sign. I am pretty sure I set up the special spacing category correctly.

The special spacing manager would be a great and necessary addition imo.

Cheers
User avatar
SCarewe
Posts: 73
Joined: 23 Apr 2021

Re: Group-group-specific kerning rules

Post by SCarewe »

Hi Rosalie, concerning fraction kerning (which is still not automatically done by KO for some reason), I wrote a script:
https://github.com/eweracs/glyphs-scrip ... ter/KernOn
It's called Set Fraction Autopairs.
User avatar
Tim Ahrens
Site Admin
Posts: 284
Joined: 11 Jul 2019

Re: Group-group-specific kerning rules

Post by Tim Ahrens »

You are right, support for numr, dnom, sups, subs and sinf is not very refined yet.

As a general principle, Kern On has a list of Unicode pairs, which is then “extended” by applying all sort of features (in all sorts of combinations), to generate additional glyph-glyph pairs. “All sorts” has a few tweaks, such as not generating smallcap-to-lowercase pairs, or ignoring tnum.

What would be the best strategy for numr, dnom, sups, subs and sinf? In theory, we want to kern all pairs that may result from the activation of features. However, that leads to lots of pairs that are not relevant in practice. I generally try to have hard-coded (or rather, too specific) rules but maybe here it would make sense from a practical point of view. Something similar to Sebastian’s script. I’ll try to find a solution for that.
Post Reply