skosch / Crimson

The Crimson Text typeface
SIL Open Font License 1.1
529 stars 55 forks source link

Kerning references non-existent glyph names #42

Open katef opened 8 years ago

katef commented 8 years ago

520f689 commits Igino Marini's iKern feature files. Unfortunately the glyphs he references seem to have been renamed since then. Merging them gives lots of errors like:

Reference to a non-existent glyph name on line 1573 of ik/Crimson-Roman#00_ik.fea.
Reference to a non-existent glyph name on line 1573 of ik/Crimson-Roman#00_ik.fea.
Empty position on line 1573 of ik/Crimson-Roman#00_ik.fea
Expected ';' at statement end on line 1573 of ik/Crimson-Roman#00_ik.fea
Reference to a non-existent glyph name on line 1577 of ik/Crimson-Roman#00_ik.fea.
Reference to a non-existent glyph name on line 1578 of ik/Crimson-Roman#00_ik.fea.
Reference to a non-existent glyph name on line 1579 of ik/Crimson-Roman#00_ik.fea.
Reference to a non-existent glyph name on line 1580 of ik/Crimson-Roman#00_ik.fea.
katef commented 8 years ago

@skosch I'm not sure what to do about this. I don't want to just comment out the offending glyphs because then obviously we'd be missing their kerns.

I presume asking him to update those .fea files to the current name would involve re-doing the work (and therefore cost?), because there's no automatic mapping between the old names and the new names.

Or I misunderstood and there was no such renaming, and these errors are caused by something I do not understand.

skosch commented 8 years ago

Aw shucks. I don't recall renaming anything, but then all of this was over four years ago. It may all have to do with his internal way of doing things; I believe like he converted to vfb (Fontlab) first and worked with those, and I wouldn't be surprised if Fontforge's internal references got lost in the process. Sorry that I can't be of more help :(

Does it tell you which glyphs are missing, or can you find out from the line numbers?

katef commented 8 years ago

I could simply comment out the offending lines, but then I fear we'd be missing a bunch of kerns.

katef commented 8 years ago

As a concrete example, Crimson-Bold#00_ik.fea refers to zero.onum. But Crimson-Bold.sfd does not contain zero.onum. So commenting that out will be harmless.

However I'm not currently sure that there aren't glyphs which ought to be referenced, but somehow aren't.

katef commented 8 years ago

7c8c2ab adds a makefile target to automate commenting out of these unused glyph names. However it (purposefully) does not comment out lines which are sets of character classes, since those also contain other glyphs. I could handle those differently, perhaps, but I like the simplicity of it being line-based.

I might extend the target to comment out the line, and then append a copy of the line with that glyph removed. Then you can easily see the difference.

So until that's handled by whatever means, the ik/*.fea files still give spurious warnings, and so it's difficult to judge what might be unrelated to those.

skosch commented 8 years ago

Nicely done! Unfortunately I really don't know what to do either. Is it at all an option to just use whatever Fontforge dumps out instead, beauty and simplicity be damned?

katef commented 8 years ago

Yes, that's possible.

I'll compare against that after I'm done with automating commenting for the iKern files. If the iKern files just contain glyphs which do not exist, then the set of glyph names should be identical for both.