justvanrossum / fontgoggles

FontGoggles: Visual OTL Preview and QA

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Distorted preview when UFO contains both kerning and a kern feature

BoldMonday opened this issue · comments

This did not happen in previous versions of FG:

Latest version of FG (v1.8) throws an error when UFO source files contain both kerning information AND a kern feature.

IBM Plex Sans Thin: font has kerning, but also manually written kerning features without an insertion comment. Dropping the former.

This feedback in itself is quite useful to know, but sadly the preview gets distorted as well:
image

You mean the striped error background, even though this is only a warning?

(Btw there is a "clear error" context menu, which should be able to work around this for now.)

Yes, I mean the striped background. :)

Did not know about the "clear error" option. That is useful for now!

What is the "insertion comment" that it checks for? That might be a way to work around this too.

the ufo2ft kern feature writer by default skips generating kerning if there's already a manually written kern feature, that's always been like that. If that's the intended behavior, you can ignore that warning.
If you do want to combine the manual and automatic kern features, you can use a "insertion comment" to tell the writer where to place the auto-generated kern feature in the context of manually written one. This was originally a feature from Glyphs.app, which is generally useful also in a UFO workflow so we added it to ufo2ft, it's been there for a while now.
The special insertion comment is # Automatic Code in its own line, to be placed anywhere within a feature block.

how is "IBM Plex Sans" built normally? Does it perhaps configures the KernFeatureWriter to use "append" mode (instead of the default "skip" mode -- the latter really should be named try-to-insert-or-skip)? The "append" mode (whereby the auto-generated feature is added at the end, thus after the manually written one) has become obsolete with the addition of the insertion maker support, since the latter is a more flexible/general approach; if the "append" mode is selected instead of "skip", then insertion markers aren't used and you'd get no warning from ufo2ft about the mixing of auto/manual kern.

how is "IBM Plex Sans" built normally? Does it perhaps configures the KernFeatureWriter to use "append" mode (instead of the default "skip" mode -- the latter really should be named try-to-insert-or-skip)? The "append" mode (whereby the auto-generated feature is added at the end, thus after the manually written one) has become obsolete with the addition of the insertion maker support, since the latter is a more flexible/general approach; if the "append" mode is selected instead of "skip", then insertion markers aren't used and you'd get no warning from ufo2ft about the mixing of auto/manual kern.

@anthrotype Final fonts are still compiled with the AFDKO.

During development feature code from different sources might be merged since collaborators can use different font editors. The final feature is then stored inside of the source file. We don’t use any parts of ufo2ft.

good, so in your case ufo2ft rightly ignores the kerning data in kerning.plist and won't auto-generate a new kern feature from it since it finds one already (and doesn't know how to combine the two), so the safest thing without knowing anything else is to at least issue a warning, which you can safely ignore.

Yes, a warning would suffice and is helpful.

Perhaps a similar warning can be issued when a source file contains both anchors and a mark / m2mk feature.