googlefonts/glyphsLib

Handle default layer with custom name

Open

#619 opened on Aug 17, 2020

View on GitHub
 (0 comments) (1 reaction) (0 assignees)Python (55 forks)github user discovery
enhancementhelp wanted

Repository metrics

Stars
 (198 stars)
PR merge metrics
 (No merged PRs in 30d)

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