Web frontend and supporting services for lance.blue

README.md

Fonts #

The site's four faces, self-hosted. src/styles.css declares them and names the job each one does; this file is where they came from and what may be done with them.

Nothing is fetched from a font CDN at runtime. A third party in the critical path of the first paint is a third party who can take the page down, and the rest of the site is one S3 bucket behind CloudFront.

What is here #

Family Job Weights Version
Chakra Petch --font-display, --font-labels 600, 700 v13
Barlow Semi Condensed --font-text 400, 500, 600, 700 v16
Saira Semi Condensed --font-facts 400 v15
Roboto Mono --font-data 400–700 variable v31

Each file is one weight and one subset: <family>-<weight>-<subset>.woff2. Both latin and latin-ext are here, carrying the unicode-range the Google Fonts CSS API published with them, so latin-ext is downloaded only when a handle or a post actually has an accent in it. An English page loads the latin files and nothing else.

Weights are only the ones the stylesheet asks for, and scripts/fonts.test.mjs checks that in both directions: a file no @font-face declares fails, and so does a rule wanting a weight no face supplies. The second one is the reason the test exists — a missing weight is synthesised rather than refused, so it renders as the regular smeared sideways and nothing says so.

Saira is 400 alone because .fact p is the only rule that uses it and nothing in a fact card is bold. Copy that arrives with a <strong> in it needs the 600 added here, or it gets a synthesised one.

Where they came from #

https://fonts.googleapis.com/css2?family=<family>:wght@<weights>&display=swap, requested with a browser user agent so the API answers in woff2, then the src: URLs from the latin and latin-ext blocks fetched as-is. The version column above is the vNN segment of those URLs. To refresh a family, request it again and compare that segment; the files are unmodified downloads, so there is nothing local to reapply.

Licences #

All four are under the SIL Open Font License 1.1, whose text is beside them:

  • OFL-Chakra-Petch.txt
  • OFL-Barlow-Semi-Condensed.txt
  • OFL-Saira-Semi-Condensed.txt
  • OFL-Roboto-Mono.txt

Two consequences worth knowing before touching these files. The OFL requires its text to travel with the fonts, which is why those four files are committed rather than linked. And Saira carries "Saira" as a Reserved Font Name, so a modified copy may not keep the name — which is the reason none of the files here is subsetted, hinted or renamed beyond the weight-and-subset suffix.