googlefonts / googlefonts/fontmake

Invalid syntax when classes contain a final glyph that is commented out

Open
#751 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
888
Forks
97
Avg merge
4d 52m
Merged PRs (30d)
1

Description

Sometimes we may have a glyph class that contains a commented-out glyph as its final member, like so:

![Screenshot 2021-03-11 at 16 57 23](https://user-images.githubusercontent.com/12471463/110825196-b2659980-828b-11eb-8194-7d5ade8637f5.png)

In this case, the glyph is not present in the font yet, so the glyph name is present, but commented out, to remind me to add it to the **@w2_5** class once it's there.

However, when FontMake parses it, it can't find the **@w3** class. Why is this? I had a look at the UFO FontMake had built, and look what happened:

![Screenshot 2021-03-11 at 16 47 49](https://user-images.githubusercontent.com/12471463/110825547-14260380-828c-11eb-9cfb-7b54829e2023.png)

The closing ] from @w2_5 accidentally got commented out, not just the glyph name! So then it's presumably not parsing the @w3 as a new class name, but as a member of the @w2_5 class?

At any rate, FontMake throws this error when trying to build the variable font:

![Screenshot 2021-03-11 at 17 00 46](https://user-images.githubusercontent.com/12471463/110825785-52232780-828c-11eb-8efb-2d164a73570d.png)

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.