googlefonts / googlefonts/glyphsLib

Handle default layer with custom name

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

Description

https://unifiedfontobject.org/versions/ufo3/layercontents.plist/ says:

> # public.default
>
> This layer name indicates that the default layer has no user defined name. It must not be used as the layer name for any directory other than the default glyphs directory.

GlyphLib assumes the default layer has no user defined name but that may not be the case.
https://github.com/googlefonts/glyphsLib/blob/638cbddd00b2334410bab914d932bf673d6342ca/Lib/glyphsLib/builder/layers.py#L74
Instead it should check that the layer is `font.layers.defaultLayer` or that its name is `font.layers.defaultLayer.name`.

Contributor guide

Open the contributing guide

Research direction

Start in Lib/glyphsLib/builder/layers.py at line 74 and compare the current default-layer check with font.layers.defaultLayer and its name. Verify that conversion handles a default layer with a custom name while preserving the restriction on non-default layers, then run the relevant test suite.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
tooling
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
58/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.