-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[variableFontsGenerator] Why does makeMasterKerningCompatible extrapolate? #25
Comments
Batch does extrapolation for inconsistent kerning pairs. Your Batch fills this up with inter/extra-polation, as this makes more sense then making a kerning exception, setting it to 0, zero. I understand in your case the value -29583 is reallllllllyyyy bad. I would recommend to have an exception in This is also how Superpol does it when generating instances. |
Reference: makeMasterKerningCompatible is at variableFontGenerator.init.py |
I've posted this gist that shows the difference between how Batch and Superpolator interpolate the kerning. While both use mutatorMath for the calculation, they approach the problem differently. The script only shows the differences and does not offer a solution, but it's a start.
Let's see if I can get a list of the different expectations in Batch. I'm not so sure extrapolated kerning is that useful. Kerning is a correction to an observed problem. Extrapolation just happens.
|
I have the assumption that the appearance of a master should not change, it should only have influence on neighboring instances. The example that Colin found of a pair off by -29583 is extreme, but even smaller values would be wrong — if we approved the fit of a master that didn’t need a kern adjustment for a particular pair I would be surprised to see a value show up in an instance taken from the same location. It makes sense however that all kerning pairs need to have a value in all masters for them to be compatible. I would expect that if a pair is missing from a master it’s either because the pair is handled by a group kern (i.e. the missing pair might only exist as an exception in another master), or the value is an implied zero-value. If it's handled by a group kern, then an exception effectively needs to be made in the master (with the group value), or if it's an implied zero an exception of zero would need to be made. It’s a different story if one or both of the glyphs associated with the kern don’t exist in the master: then it makes sense to inter/extrapolate the glyph to make the master compatible, and then to do the same with the kern (which is what it sounds like Batch is currently doing) |
A problem arises when we want to make a variable font during the design process when not all data is complete and we just want to get an idea of what is happening. Batch then somehow has to negotiate between the the loose designdata and the strict fontTools. Batch might be able to report about which pairs are missing, but that could be a massive task that needs more help and it should stand in the way to making a test font. |
#25 its using a MathKerning mutator to retrieve missing pairs instead of single pair repair mutators
While making Variable Fonts with Batch, I noticed some of the kerning going crazy.
In a design space, I had two masters very close together with different kerning values, and a master at the end of the space with a kerning value of "0", which by default is removed from the kerning plist.
What is expected is that the instances between
B
andC
would have kerning values between -15 and 0. What was happening was that I was finding a huge negative number kern forC
, something like -29583.It turns out Batch is causing this. In the
makeMasterKerningCompatible
method, it tries to even out the kerning lists for all the masters by making an extrapolation, based on a design space defined by existing kerning values. It ignores the "0" implied by the absence of a kern pair in theC
master, and instead generates a value based off of the two existing masters.I was wondering, why does Batch do this? This is wrong in my view. Instead, I think Batch should just assume that if a kerning pair is "missing" in a master, the pair should be inserted as "0". If the designer wanted there to be any other kern, he or she would have made it themselves.
The text was updated successfully, but these errors were encountered: