tools/sanity_check.py naming bug
- Dominant language
- HTML
- Stars
- 20.5k
- Forks
- 2.9k
- Avg merge
- 1d 21h
- Merged PRs (30d)
- 95
Description
There appears to be a bug when detecting the family names where the spaces in the family name are dropped - for example
```
$ python sanity_check.py ~/fonts/ofl/hindcolombo/
FAIL: Hind Colombo normal/300 'name' family[0] expected Hind Colombo, got Hind Colombo Light (/Users/dcrossland/fonts/ofl/hindcolombo)
FAIL: Hind Colombo normal/500 'name' family[0] expected Hind Colombo, got Hind Colombo Medium (/Users/dcrossland/fonts/ofl/hindcolombo)
FAIL: Hind Colombo normal/600 'name' family[0] expected Hind Colombo, got Hind Colombo SemiBold (/Users/dcrossland/fonts/ofl/hindcolombo)
```
The 400 400i 700 and 700i styles of a large family have only 4 records related to naming. Eg:
```
Hind Colombo
Bold
Hind Colombo Bold
HindColombo-Bold
```
The other 14 of the 18 possible styles have 6 records related to naming, which present a full 9 weight/18 style family as 8 families; one 4-style family as above for 2 weights, and then 7 pairs of Regular/Italic families in IDs 1 and 2. These are then reunited into a single family with the additional name IDs 16 + 17.
```
Hind Colombo Light
Regular
Hind Colombo Light
HindColombo-Light
Hind Colombo
Light
```
I guess the simple thing for sanity_check.py to do is check ID 16 and if that doesn't exist then check ID 1.
Contributor guide
Assessment
This issue has not been assessed yet.