googlefonts / googlefonts/glyphsLib

glyphsLib crash on master custom parameter `Axes`: GSFontMaster has no _set_axes_from_custom_parameter

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

Description

### Environment
- glyphsLib 6.12.6
- fontmake 3.11.1
- macOS

### Steps
1) Save the following as `glyphslib_axes_master_bug.glyphs`
2) Run:
`python3 -m fontmake -g glyphslib_axes_master_bug.glyphs -o ttf --output-dir build/repro`

### Observed
`Loading Glyphs file failed: 'GSFontMaster' object has no attribute '_set_axes_from_custom_parameter'`

### Expected
Should parse/ignore master-level custom parameter `Axes` without crashing.

### Repro file content:
```text
{
.appVersion = "3425";
.formatVersion = 3;
axes = (
{
name = Weight;
tag = wght;
}
);
familyName = "AxesMasterRepro";
fontMaster = (
{
axesValues = (
100
);
customParameters = (
{
name = Axes;
value = (
{
Name = Weight;
Tag = wght;
}
);
}
);
id = "MASTER_1";
name = Regular;
}
);
glyphs = (
{
glyphname = A;
layers = (
{
layerId = "MASTER_1";
shapes = (
{
closed = 1;
nodes = (
(100,0,l),
(500,0,l),
(300,700,l)
);
}
);
width = 600;
}
);
unicode = 65;
}
);
}
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.