Use variable fonts as source of truth, tweaks
This commit is contained in:
17
README.md
17
README.md
@@ -10,12 +10,13 @@ To accomplish this, I wanted to start from the 9pt font, which I exported. Then,
|
||||
|
||||
## Project structure
|
||||
|
||||
- `./src`: source .sfd font files (Newsreader 9pt, renamed to Readerly)
|
||||
- `./src`: Newsreader variable font TTFs (source of truth)
|
||||
- `./scripts`: FontForge Python scripts applied during the build
|
||||
- `scale.py`: scales lowercase glyphs vertically to increase x-height
|
||||
- `metrics.py`: sets vertical metrics (OS/2 Typo, Win, hhea)
|
||||
- `lineheight.py`: adjusts OS/2 Typo metrics to control line spacing
|
||||
- `rename.py`: updates font name metadata from Newsreader to Readerly
|
||||
- `./src_processed`: intermediate .sfd files after processing (generated)
|
||||
- `./src_processed`: intermediate files after instancing/processing (generated)
|
||||
- `./out`: final TTF fonts (generated)
|
||||
|
||||
## Building
|
||||
@@ -24,9 +25,15 @@ To accomplish this, I wanted to start from the 9pt font, which I exported. Then,
|
||||
python3 build.py
|
||||
```
|
||||
|
||||
This uses the Flatpak version of FontForge to:
|
||||
This uses `fontTools.instancer` and the Flatpak version of FontForge to:
|
||||
|
||||
1. Copy `./src` to `./src_processed`
|
||||
1. Instance the variable fonts into static TTFs at configured axis values (opsz, wght)
|
||||
2. Scale lowercase glyphs (configurable in `scripts/scale.py`)
|
||||
3. Set vertical metrics and update font names
|
||||
3. Set vertical metrics, adjust line height, and update font names
|
||||
4. Export to TTF with old-style kerning in `./out`
|
||||
|
||||
Variant configuration (in `build.py`):
|
||||
- Regular: wght=400, opsz=9
|
||||
- Bold: wght=550, opsz=9
|
||||
- Italic: wght=400, opsz=9
|
||||
- BoldItalic: wght=550, opsz=9
|
||||
|
||||
Reference in New Issue
Block a user