Skip to content

feat(fonts): MonoLisa 3.000 — Code everywhere, Text registered - #11836

Merged
MarkusNeusinger merged 3 commits into
mainfrom
feat/monolisa-v3
Sep 16, 2026
Merged

MarkusNeusinger merged 3 commits into
mainfrom
feat/monolisa-v3

Conversation

@MarkusNeusinger

Copy link
Copy Markdown
Owner

Summary

  • Switches anyplot.ai from MonoLisa 2.017 to 3.000. The v3 webfonts (70 Unicode-range subsets per family, variable wght + GRAD) are uploaded to gs://anyplot-static/fonts/v3/{code,text}/, the four variable TTFs to fonts/v3/desktop/. app/src/styles/fonts.css is now generated from the order page's builder CSS by automation/scripts/monolisa_fonts_css.py, so the next font update is a re-run.
  • Absorbs the two v2 → v3 breaking changes: the script italic is ss01 (the old ss02 now means "alt i r"), and coding ligatures moved from liga to dlig, which tokens.css re-enables on pre/code/kbd/samp so code blocks look as before. CSS families are 'MonoLisa Code' and 'MonoLisa Text' (new --text token, unused by default — nothing is fetched for it).
  • OG-image renderer: loads the v3 Code TTFs, sets only the wght axis of the now two-axis font (_set_variable_weight, unit-tested), caches under /tmp/anyplot-fonts/v3, draws the tagline with ss01. Docs (style guide §4/§5.1, seo.md), design-sync CSS/notes and the changelog fragment follow.

Deploy order: the v3 objects are already in the bucket (CORS verified for anyplot.ai + localhost), so this PR is safe to deploy in either order. The v2 objects stay in the bucket until the cutover is verified live; their removal is a separate, explicitly authorized step.

Plan

~/.claude/plans/ich-m-chte-die-seite-merry-meerkat.md (Phase A)

Test plan

  • /verify-frontend: landing + /ternary-basic/python/bokeh at 1440×900 and 390×844, light and dark — fonts load from fonts/v3/code/ (all 200), — any library. and <em> render as script (ss01), == in the code block renders as a ligature (dlig), no console errors, no horizontal overflow at 390 px
  • create_home_og_image light + dark rendered locally with the v3 TTFs: bold wordmark (wght applied on the two-axis font) and script tagline
  • uv run pytest tests/unit (1932 passed), ruff check + format, mypy api core
  • cd app && yarn lint && yarn fm:check && yarn type-check && yarn test && yarn build
  • uv run python -m tools.changelog check --base origin/main
  • After merge: Cloud Build deploy-app + deploy-api (europe-west4) green, then live check on anyplot.ai (network tab shows fonts/v3/…, script italic, code ligatures, OG endpoint)

🤖 Generated with Claude Code

…periments

anyplot.ai moves from MonoLisa 2.017 to 3.000. The v3 webfonts (70
Unicode-range subsets per family, variable wght + GRAD) live under
gs://anyplot-static/fonts/v3/{code,text}/ and the four variable TTFs
under fonts/v3/desktop/; app/src/styles/fonts.css is generated from the
order page's builder CSS by automation/scripts/monolisa_fonts_css.py.

Two v2 → v3 breaking changes are absorbed: the script italic is `ss01`
(the old `ss02` tag now means "alt i r"), and the coding ligatures moved
from `liga` to `dlig`, which tokens.css re-enables on pre/code/kbd/samp
so code blocks keep their ligatures. The OG-image renderer loads the v3
Code TTFs, sets only the wght axis of the now two-axis font (a bare
[weight] would raise on v3 and silently keep the default), caches under
/tmp/anyplot-fonts/v3 and draws the tagline with ss01.

CSS families are 'MonoLisa Code' and 'MonoLisa Text' (new --text token,
unused by default so nothing is fetched). Docs, design-sync CSS and
notes follow. The v2 files stay in the bucket until the cutover is
verified on anyplot.ai.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Copilot AI balanced review requested due to automatic review settings September 16, 2026 16:54
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

The untested generator and several documentation and deployment-contract inconsistencies should be corrected before approval.

Get a fresh assessment by requesting another Copilot review.

Pull request overview

Migrates web and OG-image typography from MonoLisa 2.017 to MonoLisa 3.000.

Changes:

  • Registers MonoLisa Code and Text v3 webfonts through generated CSS.
  • Updates OpenType features, font tokens, caching, and OG rendering.
  • Updates tests, design-sync configuration, documentation, and changelog.
File summaries
File Description
.gitignore Ignores additional proprietary font formats.
.design-sync/NOTES.md Updates font-fetch instructions.
.design-sync/conventions.md Documents v3 typography conventions.
api/main.py Updates shaping diagnostics terminology.
app/.designsync-fonts/monolisa.css Registers v3 desktop font families.
app/index.html Preloads v3 Code subsets.
app/src/main.tsx Updates the font import description.
app/src/sections/landing/HeroSection.tsx Uses the v3 script feature.
app/src/styles/fonts.css Defines generated v3 webfont subsets.
app/src/styles/tokens.css Adds v3 families and coding ligatures.
app/src/theme/tokens.ts Exposes Code and Text stacks.
automation/scripts/monolisa_fonts_css.py Generates the webfont stylesheet.
changelog.d/monolisa-v3.md Records the migration.
core/images.py Loads and configures v3 OG fonts.
docs/reference/seo.md Documents OG font rendering.
docs/reference/style-guide.md Updates typography guidance.
tests/unit/core/test_images.py Tests v3 paths, axes, and shaping.
Review details
  • Files reviewed: 16/17 changed files
  • Comments generated: 6
  • Review effort level: Balanced (auto)

Note

Copilot is running an experiment and ran this review at Balanced.


💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread automation/scripts/monolisa_fonts_css.py
Comment thread app/index.html Outdated
Comment thread automation/scripts/monolisa_fonts_css.py Outdated
Comment thread changelog.d/monolisa-v3.md Outdated
Comment thread core/images.py
Comment thread docs/reference/style-guide.md Outdated
…d apply the Copilot review

- resolve core/images.py + test_images.py against the locked, .part-download cache
- add unit tests for automation/scripts/monolisa_fonts_css.py
- fix the preload comment in app/index.html, the CORS line in the generated
  fonts.css header, the style-guide skeleton preloads, the changelog wording,
  and the last two ss02 mentions (core/images.py docstring, api/Dockerfile)

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@MarkusNeusinger

Copy link
Copy Markdown
Owner Author

Copilot round 1, all six applied in 966749f: unit tests for the generator (tests/unit/automation/scripts/test_monolisa_fonts_css.py, 10 cases), preload comment in app/index.html now describes the swap face, generated header says "anyplot.ai + localhost", changelog fragment states that v2 removal is a separate authorized step, ss02ss01 in the core/images.py docstring and api/Dockerfile, style-guide skeleton mirrors the three real preloads. The same commit merges origin/main (font-cache rework from #11828) into the branch.

@codecov

codecov Bot commented Sep 16, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 87.05882% with 11 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
automation/scripts/monolisa_fonts_css.py 85.91% 10 Missing ⚠️
core/images.py 92.85% 1 Missing ⚠️

📢 Thoughts on this report? Let us know!

@MarkusNeusinger
MarkusNeusinger merged commit 7e64b16 into main Sep 16, 2026
12 checks passed
@MarkusNeusinger
MarkusNeusinger deleted the feat/monolisa-v3 branch September 16, 2026 17:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants