Remove kerning pair
-
hello, i see there is the method
kerning.remove(pair)
and i thought it will delete the kerning pair but in fact it just sets the value to zero and keeps the pair.
is that intended that way? if yes what would be a good way to remove a kerning pair with a script?thanks. jo
-
hello jens, thanks for your help.
in fact your example is what "happened" in my case.
I did some very quick kerning without groups. Later on I replaced the single letters of the pairs with groups through a script. I also wanted to remove the original pair but the zero value was "overwriting" the group value.
so i guess it could work with kerning update etc but the "del" way worked just fine.
cheers, jo
-
Setting a kern pair to zero in fact deletes it: https://github.com/robofab-developers/robofab/blob/master/Lib/robofab/objects/objectsBase.py#L3119-L3121
I can think of at least one case in which you would want to differentiate between a value of 0 and a nonexisting kern value, which is when the kerning pair is an exception to a class pair.
-
setting to zero with remove seems a bit strange but thanks a lot for the help.
i trieddel
before, but I guess I did something wrong, since it did not work.
now it worked just fine.
thanks! j
-
but
del font.kerning[pair]
should work :)
-
Hi
this is the default behavior
In not sure why….