Kern a group with other groups but not with each other?

Post Reply
skyrailhighline
Posts: 17
Joined: 25 Apr 2021

Kern a group with other groups but not with each other?

Post by skyrailhighline »

I want my small numerals to be kerned with other glyphs for example letters – superiors, but I don't need the superiors to be kerned with each other. Is this possible?
User avatar
SCarewe
Posts: 135
Joined: 23 Apr 2021

Re: Kern a group with other groups but not with each other?

Post by SCarewe »

This isn't explicitly possible as you describe it. What you can do is set one side of the superiors to "no kerning", which will disable all kerning between superiors, but keep kerning on one side of the superiors with all other glyphs.

Otherwise, enumerate all superior combinations and add them as independent pairs (userData key "KernOnIndependentPairs").
User avatar
Tim Ahrens
Site Admin
Posts: 502
Joined: 11 Jul 2019

Re: Kern a group with other groups but not with each other?

Post by Tim Ahrens »

Setting one side to “No kerning” is a smart idea, and it will work.
SCarewe wrote: 12 Feb 2026 Otherwise, enumerate all superior combinations and add them as independent pairs (userData key "KernOnIndependentPairs").
Yes, that’s another possibility. Just for clarification: set them as independent pairs with value zero to “deactivate” them.
skyrailhighline
Posts: 17
Joined: 25 Apr 2021

Re: Kern a group with other groups but not with each other?

Post by skyrailhighline »

Thank you for the response. What's the quickest way to add them as independent pairs with value=0 – is there a programmatic way?
User avatar
Tim Ahrens
Site Admin
Posts: 502
Joined: 11 Jul 2019

Re: Kern a group with other groups but not with each other?

Post by Tim Ahrens »

You could use this script in the macro panel:

Code: Select all

glyphNames = 'zeroinferior oneinferior twoinferior threeinferior fourinferior fiveinferior sixinferior seveninferior eightinferior nineinferior zerosuperior onesuperior twosuperior threesuperior foursuperior fivesuperior sixsuperior sevensuperior eightsuperior ninesuperior'
glyphNames = glyphNames.split()
for first in glyphNames:
	for second in glyphNames:
		print('/'+first+'/'+second)
You may need to change glyphNames so as to reflect the ones you use (select them, right-click, copy glyph names space separated).

Then copy the output into a new tab, select all and set them as independent pairs. Then, set their value to zero.
Post Reply