Skip to content

fix(site): subset the web fonts and give link previews a proper card - #220

Merged
TMHSDigital merged 2 commits into
mainfrom
fix/216-fonts-og-image
Sep 23, 2026
Merged

TMHSDigital merged 2 commits into
mainfrom
fix/216-fonts-og-image

Conversation

@TMHSDigital

Copy link
Copy Markdown
Owner

Summary

Closes #216: the two weight and link-preview items from the Pages review.

Type

  • feat
  • fix — site weight and metadata
  • docs / chore / ci / refactor

Changes

Fonts (scripts/site/fonts/) are subset to the 235 code points the 82 generated pages actually use, plus Latin-1 and General Punctuation, with all OpenType layout features kept. That set includes the README maths: Σ π φ ᵢ ≤ ≥ ≈ ≠ √ ∈ ∪ → ↔ ▾.

Font Before After
inter-regular 111,268 27,232
inter-medium 114,348 27,848
inter-bold 114,840 27,856
jetbrains-mono-regular 92,380 33,916
barlow-condensed-500 21,424 19,120
barlow-condensed-600 22,308 19,996
Total 476,568 B 155,968 B

A character outside the set falls back to the next family in the stack. The re-subset recipe is in a comment on the @font-face block.

Link previews:

  • New assets/og-card.jpg: 1200×630, 59 KB, a 2×2 of the four top-featured renders.
  • The landing page (site.json) and gallery index use the card with og:image:width/height/alt and twitter:image:alt.
  • Gallery detail pages keep their 1280×720 hero webp, now with width, height and alt.
  • Every page gets og:site_name.
  • Not done: per-page JPEG cards for the 79 detail pages. The webp hero stays there, which is the remaining gap from Site weight and link previews: unsubset fonts, webp og:image #216.

Evidence

  • live-run-proven (local, no Blender):
    • Coverage: for each font, every used code point the original covered is still covered (lost 0 in all six). Only ccmp, cv14 (Inter) and cv99 (JetBrains Mono) dropped out; they apply only to removed glyphs, and the site sets no font-feature-settings.
    • In the browser: on a locally served /gallery/armature-bend/, document.fonts loads Barlow Condensed 600, Inter 400/500 and JetBrains Mono 400. document.fonts.check() is true for Σ wᵢ ≤ ≥ → — (Inter) and Σ ≤ ≥ → (JetBrains Mono). A screenshot of the LBS formula row renders correctly.
    • Tags: the rebuilt docs/index.html, docs/gallery/index.html and docs/gallery/cart/index.html carry the new tags. Values checked: 1200/630 plus alt for the card; 1280/720 plus alt for the detail hero.
    • Gallery regenerated: 80 pages change, in the <head> only.
  • inspection-only: how each social platform renders the card isn't testable before deploy.

Checklist

  • Explicit paths only.
  • Counts and manifest unchanged.
  • DCO Signed-off-by: present.
  • No credentials, emails, or local paths.

🤖 Generated with Claude Code

TMHSDigital and others added 2 commits September 23, 2026 05:13
- Fonts: the six self-hosted woff2 files (476 KB) are subset to the 235
  code points the generated pages use, plus Latin-1 and general
  punctuation: 156 KB. Every used character the original covered is still
  covered; only ccmp/cv14/cv99, which apply to dropped glyphs, go.
- Link previews: the landing page and gallery index used a 1280x720 webp
  hero with no size or alt. They now use assets/og-card.jpg (1200x630,
  59 KB), and every page carries og:image:width/height/alt,
  twitter:image:alt and og:site_name.

Closes #216

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Signed-off-by: TMHSDigital <154358121+TMHSDigital@users.noreply.github.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Signed-off-by: TMHSDigital <154358121+TMHSDigital@users.noreply.github.com>
@github-actions github-actions Bot added the documentation Improvements or additions to documentation label Sep 23, 2026
@TMHSDigital
TMHSDigital merged commit b2177e1 into main Sep 23, 2026
11 checks passed
@TMHSDigital
TMHSDigital deleted the fix/216-fonts-og-image branch September 23, 2026 09:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Site weight and link previews: unsubset fonts, webp og:image

1 participant