googlefonts / googlefonts/gftools

Inconsistently gftools-gen-stat and "compress" swap position in the build order

Open
#1,015 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
283
Forks
73
Avg merge
21h 25m
Merged PRs (30d)
8

Description

A client running one of my builder scripts has been encountering an inconsistent issue where the "gftools-gen-stat" command and "compress" commands switch places in the build order. This causes a fail as the variable font has not been saved to the output location before builder tries to compress it to a webfont.

`build.ninja`:
```
# buildVariable: Build a variable font from a source file
rule buildVariable
command = $
/Users/aaronbell/Documents/CJK/venv/bin/python3.12 $
-m gftools.builder.jobrunner fontmake --output-path $out -o variable $
$fontmake_type $in $args $stamp
description = buildVariable

# fix: Run gftools-fix
rule fix
command = $
/Users/aaronbell/Documents/CJK/venv/bin/python3.12 $
-m gftools.builder.jobrunner gftools-fix-font -o $out $args $in $stamp
description = fix

# buildStat: Build a STAT table from one or more source files
rule buildSTAT-operation
command = gftools-gen-stat --out $tempdir $args -- $in && mv $finalfile $
$out $stamp
rule buildSTAT-postprocess
command = gftools-gen-stat --inplace $args -- $in $stamp

# compress: Compress to webfont
rule compress
command = $
/Users/aaronbell/Documents/CJK/venv/bin/python3.12 $
-m gftools.builder.jobrunner fonttools ttLib.woff2 compress -o $out $
$in $stamp
description = compress
```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.