axisregistry build_fvar_instances produces nonfunctional nameIDs
- Dominant language
- HTML
- Stars
- 20.5k
- Forks
- 2.9k
- Avg merge
- 1d 21h
- Merged PRs (30d)
- 95
Description
**Describe the issue**
I am using the builder on a font project that does not include a Regular instance (Light - Medium - ExtraBold). As part of the builder process, `fonttools.axisregistry`'s `build_fvar_instances` tool is run on the font source. This script deletes all the fvar table data, and replaces it with data that specifically aligns with the axisregistry standard.
However, as part of this process, it also adds the postscript name of the font to `name` table entry. For example:
```
`Light` -> `ChironSungHK-Light`
`Regular` -> `ChironSungHK-Regular`
```
etc.
The end result is that certain instances are no longer accessible. In the case of Chiron Sung HK, the Regular and ExtraLight instances cannot be accessed. This is likely due to their use in `name` ID 1/2 and 16/17.
I've verified that removing the postscript name corrects this problem.
The specific fix that I did locally, which solves this problem, is to [comment out the line here](https://github.com/google/fonts/blob/d48229c9c5a00aed0b99fc6abfdc8a37ab1fe1f2/axisregistry/Lib/axisregistry/__init__.py#L430):
```
# inst.postscriptNameID = name_table.addName(
# f"{family_name}-{name}".replace(" ", "")
# )
```
**To Reproduce**
You can test the fonts here: https://github.com/aaronbell/chiron-sung-hk-gf/tree/ce456afcb95bc8c1d065338779fb0da7dc3a71dd/fonts/variable
**Expected behavior**
Style names should be preserved AS IS without the postscript name attached, like so:
**Additional context**
Repros on MS Word for Mac 16.47
Contributor guide
Assessment
This issue has not been assessed yet.