Skip to content

Latest commit

 

History

History
73 lines (51 loc) · 2.46 KB

File metadata and controls

73 lines (51 loc) · 2.46 KB

grigson-fonts

Subset WOFF2 font files used by the grigson HTML renderer.

This package exists as a versioned container for the font files so they can be served via the jsDelivr GitHub CDN. It has no build step and no npm dependencies — it is purely a collection of files under a version tag.

Fonts

File Font License Upstream
NotoSans-subset.woff2 Noto Sans OFL-1.1 https://github.com/google/fonts
NotoSerif-subset.woff2 Noto Serif OFL-1.1 https://github.com/google/fonts
NotoSansSymbols2-subset.woff2 Noto Sans Symbols 2 OFL-1.1 https://github.com/google/fonts
Bravura-subset.woff2 Bravura OFL-1.1 https://github.com/steinbergmedia/bravura
PetalumaScript-subset.woff2 PetalumaScript OFL-1.1 https://github.com/steinbergmedia/petaluma

All fonts are licensed under the SIL Open Font License 1.1.

CDN URL pattern

Files in this package are served via jsDelivr at:

https://cdn.jsdelivr.net/gh/nelstrom/grigson@grigson-fonts-v{version}/packages/grigson-fonts/fonts/{file}

For example, with version 1.0.0:

https://cdn.jsdelivr.net/gh/nelstrom/grigson@grigson-fonts-v1.0.0/packages/grigson-fonts/fonts/NotoSans-subset.woff2

Versioning

grigson-fonts uses its own version number (independent of the grigson package). When fonts are updated, bump the version in package.json and create a git tag:

git tag grigson-fonts-v{version}
git push origin grigson-fonts-v{version}

After bumping the version, re-run the CDN constants generator so the grigson package picks up the new URLs:

node scripts/gen-cdn-constants.mjs

Then rebuild the CDN browser bundles:

pnpm --filter grigson run build:browser:cdn
pnpm --filter grigson run build:browser:cdn:register

Regenerating subsets

The WOFF2 files are generated by scripts in the scripts/ directory at the repo root. Prerequisites:

pip install fonttools brotli

Then run each generator (they write WOFF2 files here automatically):

node scripts/gen-noto-subsets.mjs
node scripts/gen-bravura-subset.mjs
node scripts/gen-jazz-subsets.mjs