Exclude non-exporting glyphs?

Post Reply
Jeremy Tribby
Posts: 14
Joined: 25 Dec 2022

Exclude non-exporting glyphs?

Post by Jeremy Tribby »

Hi Tim, I wonder if Kern On should exclude pairs with non-exporting glyphs from its suggestions? It would make sense to me, but maybe there's something I'm not considering
etunni
Posts: 11
Joined: 23 Apr 2021

Re: Exclude non-exporting glyphs?

Post by etunni »

I agree too!
User avatar
Tim Ahrens
Site Admin
Posts: 421
Joined: 11 Jul 2019

Re: Exclude non-exporting glyphs?

Post by Tim Ahrens »

I already thought about somehow considering the exported-ness of glyphs but this needs a little clarification.

Can you give an example?

It seems you have glyphs that are non-exporting, but you chose not to give them “No kerning” as you want them autokerned. This probably means they are used in ligature-style composites, right? One example would be fractions: You may choose not to export the numerators or denominators as glyphs (because it’s not a full set) but they need kerning against the fraction slash so that your pre-composed fractions look right. This is how I recently worked myself.

If we want autokerning between the components then aren’t they also sensible models?
Jeremy Tribby
Posts: 14
Joined: 25 Dec 2022

Re: Exclude non-exporting glyphs?

Post by Jeremy Tribby »

I don't think I want autokerning between components that are not exporting. I can provide an example: let's say I have a non-exporting glyph named "_part.ka-angle" which is just the right side of /K without the left stem. And I use it to construct my /K and /Ж etc. In my opinion, the glyphs in which this component (potentially smart component) are used —/K and /Ж — are what should be modeled, rather than the components themselves. Why create a model (and potential kerning class) for "_part.ka-angle" when there isn't even a codepoint at which it can be accessed by users?

For fractions it would be the same IMO: where there are codepoints, that are exporting, I think there should be kerning. The components are just not something I'm really visually looking at while kerning with Kern-On. Usually to initiate the kerning, I do the same thing I always have, using sample strings and kerning pairs and words that use actual glyphs with codepoints assigned to them. Then I start to look more at Kern On's suggestions. And they often include these components that are just parts of glyphs, and I cant think of why. I may be making incorrect assumptions about how Kern On works internally
User avatar
Tim Ahrens
Site Admin
Posts: 421
Joined: 11 Jul 2019

Re: Exclude non-exporting glyphs?

Post by Tim Ahrens »

Thanks for the explanation, Jeremy. It seems we are both right, in a way. Let me explain:

Before Kern On v 1.20 (from February 2023), pairs were generated only on the basis of codepoints and OT features, i.e. those that can be accessed by users, as you describe. However, some users (including myself) found it desirable to have fractions autokerned. Setting the relevant pairs as user-set autopairs is possible but very tedious, so Sebastian Carewe even wrote a Glyphs script for this purpose.

This is why Kern On now automatically adds pairs from composites (you may have seen the notification). I am sure this is convenient in many cases for many users. Inside the Kern On engine, in order to identify these added pairs, they are given a nominal, fixed frequency, which is higher than those naturally occurring (so as to be unique). What I didn’t notice, though, is that this makes these pairs very likely suggestions (Kern On prefers high-frequency pairs).

I just fixed this so these pairs are no longer suggested as models, as per the original request. It will be reflected in the next update.

That said, I’d still recommend to set any glyph side that you don’t want to be kerned explicitly to “No kerning”, in a set-up-and-forget manner. This makes it very clear to Kern On on (and yourself, as you examine the glyphs) what the intention is: No kerning means no kerning, no questions asked – they are simply removed from the system. I believe this is better than relying on implicit mechanisms. They will also show up in the overview (which you can show by using “Show overview” from the drop-down menu).
Jeremy Tribby
Posts: 14
Joined: 25 Dec 2022

Re: Exclude non-exporting glyphs?

Post by Jeremy Tribby »

Ah that makes sense - the frequency of certain components would end up being very high in some cases. Thanks for making the change. It does sound ideal to set them to "No kerning"
Post Reply