googlefonts / googlefonts/glyphsLib

Set `stylename`, `postscriptfontname`, and `stylemapfamilyname` DS attributes based on `Localized Family Names` and `Localized Style Names` Export properties

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

Description

I’m hoping to use FontMake to build from a single Glyphs source to multiple subfamilies in a superfamily, as is a typical need for many retail foundries. For example, it should be possible to create a Glyphs source containing Width and Weight axes, then build to families like `Familyname Condensed` and `Familyname Wide`, each with weights inside such as `Regular` and `Bold`, and also use that Glyphs source to build a variable font with all styles correctly labeled in the `fvar` table. This is currently possible to build directly from Glyphs, but it would be ideal to be able to build with FontMake.

I’ve investigated what is blocking this, and I’ve narrowed it down to two main factors that hopefully come close to clarifying the issue and possible solution. I have documented my testing in the repo [arrowtype/test-fontmake-glyphs-build-naming](https://github.com/arrowtype/test-fontmake-glyphs-build-naming).

If these two things happened when going from Glyphs to UFO/designspace, I believe build outcome described above would be possible:
1. Set `stylename`, `postscriptfontname`, and `stylemapfamilyname` attributes based on `Localized Family Names` and `Localized Style Names` Export properties. It seems that `Localized Family Names` is already being used, to an extent, which hopefully gives a head start on this set of improvements. This is the primary purpose of filing this issue.
2. glyphsLib should create `label` elements for axes in a designspace. This is covered by https://github.com/googlefonts/glyphsLib/issues/876.

It seems that the second item would require collaboration/leadership from the Glyphs team.

The first item is also essential, at least with the current way FontMake builds from a v5 Designspace.

I’m not sure I have the knowledge to implement either of the above changes, but I’ve done my best to test and document this thoroughly, to hopefully provide a first step in the effort. If anyone has any insight into what area of the library might have to change to implement change 1, I’d love for any insights to be shared in this issue!

Contributor guide

Open the contributing guide

Research direction

Start with the documented testing in arrowtype/test-fontmake-glyphs-build-naming and inspect how glyphsLib currently handles Localized Family Names and Localized Style Names when producing UFO/designspace data. Done means stylename, postscriptfontname, and stylemapfamilyname reflect those Export properties; axis label work is separately tracked in glyphsLib issue #876.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
build-system, tooling
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.