googlefonts / fontdiff

tool for finding visual differences between two font versions
Other
135 stars 29 forks source link

Document how to automate comparison of Glyphs/fontmake output in README #8

Closed davelab6 closed 7 years ago

davelab6 commented 7 years ago

To compare the output between Glyphs and fontmake using fontdiff, how can one build fonts with Glyphs using a shell script? Is there a headless version of Glyphsapp?

brawer commented 7 years ago

It would be great to systematically mass-test fontmake on a sizable number of *.glyphs files. This would ensure that fontmake produces fonts that are visually identical to those written in Glyphs.app. fontdiff can definitely play are role in this testing: call it with --before pointing to the {*.otf, *.ttf, *.ttc, *.otc} files produced by Glyphs.app, and --after pointing to the same files produced by fontmake. When there’s no difference, fontdiff will exit with status code zero.

To do this on a large number of fonts, Glyphs.app can probably be scripted. Would you be able to find out how exactly to do this? Some starting points would be here, or just ask on their support list.

davelab6 commented 7 years ago

Yep :) Georg provided some AppleScript that will do for now :)

I think some of the Google Fonts use the "advanced" Glyphs v2 features like smart components and corner components, but knowing what percentage of the collection can be built with fontmake flawlessly will be 👌

graphicore commented 7 years ago

I think some of the Google Fonts use the "advanced" Glyphs v2 features like smart components and corner components, but knowing what percentage of the collection can be built with fontmake flawlessly will be :ok_hand:

The the fonts that don't build fine would make a good todo list for fontmake.

brawer commented 7 years ago

The the fonts that don't build fine would make a good todo list for fontmake.

Absolutely. Actually, if you could make mini-examples (eg. a small Glyphs source file that has smart components, plus the expected compiled output from this source), they can be added to the fontmake codebase right ahead. fontmake already has continuous testing where a Glyphs file gets compiled with fontmake whenever somebody makes a GitHub pull request to the fontmake source. After building the font, the test compares the resulting binary font with fontdiff against a “golden” file that was originally produced by Glyphs. The test only passes if fontdiff says there is no visual difference between the two font files.

graphicore commented 7 years ago

Great, thanks for the link! This is exactly the stuff I'm looking for at the moment.

brawer commented 7 years ago

Closing this bug since (afaik) there’s nothing fontdiff should do differently than now.

davelab6 commented 7 years ago

@brawer I re-titled the issue to make it clear what action I am proposing; I can make a PR to address this :)

brawer commented 7 years ago

Sure, go ahead. PR welcome.