googlefonts / googlefonts/glyphsLib

glyphs2ufo produces different results than fontmake -o ufo

Open
#888 3 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
201
Forks
56
Avg merge
17m
Merged PRs (30d)
1

Description

I noticed that, when generating UFOs of an Italic Glyphs source, I am seeing different results in the UFO generated. This is causing the variable fonts that I eventually produce to lack Italic classification in the fsSelection and macStyle bits.

In particular the difference is being caused by the lack of styleMapFamilyName / styleMapStyleName in the master UFOs being produced.

Here are the fontinfo files produced by the two methods, and the glyphs file from which they were generated:
[Archive.zip](https://github.com/googlefonts/glyphsLib/files/11127794/Archive.zip)

For reference, here's the versions of glyphsLib and fonttools I have installed:
glyphsLib 6.0.7
fonttools 4.39.2

The fontmake output appears to be the better approach for generating UFOs that will eventually be built using fonttools, so that's what I have implemented, but I was surprised to see the difference.

Any idea what might be going on here?

Contributor guide

Open the contributing guide

Research direction

Start by unpacking Archive.zip and comparing the fontinfo files produced by glyphs2ufo and fontmake, along with the source .glyphs file. Trace how the two commands populate styleMapFamilyName and styleMapStyleName, then verify that the generated master UFOs preserve Italic classification in the downstream fonttools output.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.