Source
This app’s code and revision history are public. Download a copy or explore the files below.
Public
The app’s code and revision history are public.
Run it yourself
Take the whole tree and run it on your own machine. The download needs no account. Cloning needs a sign-in.
Download .zip
bounded clone 70bace54357d4b57b674108f
A copy you download is not bounded. The guarantees this app runs under - declared egress, proven invariants, writes that fail closed - live in the runtime serving this page, not in the files. What you get is auditable source you can read and run, with no runtime guarantees attached.
scripts/build-fonts.py
# Builds the resume fonts: static Archivo and Newsreader with Latin, Latin Extended and Vietnamese,
# used by both the on-screen paper and the PDF, plus their advance widths for the layout.
# Kerning and ligatures are dropped so the browser, the layout and pdf-lib all measure text the same.
# Sources: the woff2 files of @fontsource/archivo@5.2.8 and @fontsource/newsreader@5.2.10 (OFL),
# unpacked with `npm pack`. Needs fonttools and brotli.
# Usage: python3 scripts/build-fonts.py <archivo package dir> <newsreader package dir>
import json, sys
from pathlib import Path
from fontTools.ttLib import TTFont
from fontTools.merge import Merger
archivo, newsreader = map(Path, sys.argv[1:3])
here = Path(__file__).resolve().parent.parent
FACES = {
"sans": (archivo, "archivo", 400, "Archivo", "Regular"),
"sansBold": (archivo, "archivo", 600, "Archivo", "SemiBold"),
"serif": (newsreader, "newsreader", 500, "Newsreader", "Medium"),
}
metrics = {}
for key, (pkg, name, weight, family, style) in FACES.items():
parts = []
for subset in ("latin", "latin-ext", "vietnamese"):
f = TTFont(pkg / "files" / f"{name}-{subset}-{weight}-normal.woff2")
f.flavor = None
for t in ("GSUB", "GPOS", "GDEF", "kern"):
if t in f: del f[t]
tmp = here / f".{key}-{subset}.ttf"
f.save(tmp)
parts.append(tmp)
font = Merger().merge([str(p) for p in parts])
for p in parts: p.unlink()
names = font["name"]
for nid, value in ((1, family), (2, style), (4, f"{family} {style}"), (6, f"{family}-{style}")):
names.setName(value, nid, 3, 1, 0x409)
out = here / "public" / "fonts" / f"resume-{key}.ttf"
font.save(out)
font = TTFont(out)
cmap = font.getBestCmap()
hmtx = font["hmtx"]
metrics[key] = {
"upm": font["head"].unitsPerEm,
"widths": {str(cp): hmtx[g][0] for cp, g in sorted(cmap.items())},
}
print(key, out.name, out.stat().st_size, "bytes,", len(cmap), "characters")
(here / "src" / "fontMetrics.json").write_text(json.dumps(metrics, separators=(",", ":")))
Change history
Quality pass: several resumes, cover letters, phone-readable shared pages
Bounded source sync
Bounded source sync
Bounded source sync