@@ -114,7 +114,7 @@ def getkern(left, right):
114114 return None
115115
116116 a = font ['_pad_space' ].width
117- a = max ( a - 20 , 0 )
117+ a = a - 20
118118
119119 # The same combination will be overwritten, so the one written last will take effect.
120120 # autoKern looks at the outline, so even if you change the padding, it absorbs all of it.
@@ -124,6 +124,8 @@ def getkern(left, right):
124124 kern (60 + a , ['s' ], set (lower ) - {'i' , 'j' , 'f' , 't' , 'x' }, onlyCloser = True , damper = 0.75 ) # loosen by damper
125125 # Overwrite sf and st. (From experience, it is often just right to adopt the larger of the two
126126 # separation required by the glyphs on the left and right.)
127+ # The horizontal bars of 'r' and 'f' get caught between the dot and the stem of 'i', causing
128+ # unexpected behavior, so 'i' and 'j' are excluded.
127129 kern (80 + a , set (lower ) - {'i' , 'j' }, ['f' , 't' ], onlyCloser = True , damper = 0.75 )
128130 kern (90 + a , set (lower ) - {'i' , 'j' }, ['x' ], onlyCloser = True , damper = 0.75 ) # kx is fine, fx is tight
129131 kern (80 + a , ['x' ], set (lower ) - {'i' , 'j' }, onlyCloser = True , damper = 0.75 )
@@ -135,29 +137,29 @@ def getkern(left, right):
135137 kern (100 + a + diff_ro_re , ['r' ], ['e' ], onlyCloser = True , damper = 0.75 )
136138 # including uppercase
137139 # Set *Y altogether first: CY, OY, etc. will have appropriate values set in the latter part.
138- kern (105 , roman , ['Y' , 'T' ], onlyCloser = True , damper = 0.75 )
139- kern (100 , caps , ['f' ], onlyCloser = True , damper = 0.75 )
140+ kern (105 + a , roman , ['Y' , 'T' ], onlyCloser = True , damper = 0.75 )
141+ kern (100 + a , caps , ['f' ], onlyCloser = True , damper = 0.75 )
140142 # F/E are separated from T/J so they can use a tighter target gap.
141- kern (110 , ['F' ], set (roman ) - {'j' }, onlyCloser = True , damper = 0.75 ) # keep FO≈-60
143+ kern (110 + a , ['F' ], set (roman ) - {'j' }, onlyCloser = True , damper = 0.75 ) # keep FO≈-60
142144 # Since F and z mesh together and the kerning becomes too large,
143145 # reuse the kerning value of one of the round letterforms.
144146 diff_Fo_Fz = getkern ('F' , 'o' ) - getkern ('F' , 'z' )
145- kern (110 + int (diff_Fo_Fz / 0.75 ), ['F' ], ['z' ], onlyCloser = True , damper = 0.75 )
146- kern (90 , ['E' ], set (roman ) - {'j' }, onlyCloser = True , damper = 0.75 ) # keep ES≈-30
147- kern (45 , ['E' ], ['V' ], onlyCloser = True , touch = True )
148- kern (115 , ['T' , 'J' ], set (roman ) - {'j' }, onlyCloser = True , damper = 0.75 ) # keep Tr≈-105
149- kern (105 , ['Y' ], set (roman ) - {'j' }, onlyCloser = True , damper = 0.75 )
150- kern (85 , ['V' ], caps , onlyCloser = True , damper = 0.75 )
147+ kern (110 + a + int (diff_Fo_Fz / 0.75 ), ['F' ], ['z' ], onlyCloser = True , damper = 0.75 )
148+ kern (90 + a , ['E' ], set (roman ) - {'j' }, onlyCloser = True , damper = 0.75 ) # keep ES≈-30
149+ kern (45 + a , ['E' ], ['V' ], onlyCloser = True , touch = True )
150+ kern (115 + a , ['T' , 'J' ], set (roman ) - {'j' }, onlyCloser = True , damper = 0.75 ) # keep Tr≈-105
151+ kern (105 + a , ['Y' ], set (roman ) - {'j' }, onlyCloser = True , damper = 0.75 )
152+ kern (85 + a , ['V' ], caps , onlyCloser = True , damper = 0.75 )
151153 # C: loosen from the default (was too tight for Cj).
152154 # Compared to E, the lower curve of C tends to come close to the next character,
153155 # but this is considered an intentional design.
154- kern (60 , ['C' ], set (roman ) - {'j' }, onlyCloser = True , damper = 0.75 ) # keep CK≈-15
155- kern (25 , ['C' ], ['V' ], onlyCloser = True , touch = True )
156- kern (60 , ['O' ], set (roman ) - {'j' }, onlyCloser = True , damper = 0.75 ) # loosen
157- kern (100 , ['P' ], set (roman ) - {'j' }, onlyCloser = True , damper = 0.75 )
156+ kern (60 + a , ['C' ], set (roman ) - {'j' }, onlyCloser = True , damper = 0.75 ) # keep CK≈-15
157+ kern (25 + a , ['C' ], ['V' ], onlyCloser = True , touch = True )
158+ kern (60 + a , ['O' ], set (roman ) - {'j' }, onlyCloser = True , damper = 0.75 ) # loosen
159+ kern (100 + a , ['P' ], set (roman ) - {'j' }, onlyCloser = True , damper = 0.75 )
158160 diff_Po_Pe = getkern ('P' , 'o' ) - getkern ('P' , 'e' )
159- kern (100 + int (diff_Po_Pe / 0.75 ), ['P' ], ['e' ], onlyCloser = True , damper = 0.75 )
160- kern (35 , ['L' ], set (roman ) - {'j' }, onlyCloser = True , touch = True )
161+ kern (100 + a + int (diff_Po_Pe / 0.75 ), ['P' ], ['e' ], onlyCloser = True , damper = 0.75 )
162+ kern (35 + a , ['L' ], set (roman ) - {'j' }, onlyCloser = True , touch = True )
161163
162164
163165autokern (font )
0 commit comments