googlefonts / googlefonts/glyphsLib

“Replace Prefix” does not work for prefixes with features

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

Description

I have a prefix will basically all the feature code, and one instance with “Replace Prefix” custom parameter. However glyphLib will keep all the features and replace only the language statements. Apparently the code that converts UFO features back to Glyphs features misidentifies where the prefix ends (why this two way conversion before applying the custom parameter is even needed is beyond me).

[NoNameFixed-Regular.zip](https://github.com/googlefonts/glyphsLib/files/6254964/NoNameFixed-Regular.zip)

This should generate a font with no OpenType layout tables, but it doesn’t:
```
$ fontmake -g NoNameFixed-Regular.glyphs --no-generate-GDEF -i '.* Terminal Regular' -o otf
```

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the issue with NoNameFixed-Regular.zip and the provided fontmake command. Trace the conversion from UFO features back to Glyphs features, focusing on how the prefix boundary is identified when applying the “Replace Prefix” custom parameter. Done means the generated font has no OpenType layout tables.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
tooling
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.