Skip to content

feat(site): use OpenMono as the mono typeface - #64796

Draft
iamdavidhill wants to merge 9 commits into
devfrom
openmono-site
Draft

iamdavidhill wants to merge 9 commits into
devfrom
openmono-site

Conversation

@iamdavidhill

@iamdavidhill iamdavidhill commented Nov 19, 2026 •

Copy link
Copy Markdown
Contributor

Issue for this PR

No issue. This follows the release of OpenMono 1.000.

Type of change

  • Bug fix
  • New feature
  • Refactor / code improvement
  • Documentation

What does this PR do?

The website and the docs (services/site) set their mono text in OpenMono, Anomaly's typeface, built on Iosevka by Belleve Invis (SIL OFL 1.1). The files come from the OpenMono 1.000 build.

  • Family name. "OpenMono" in CSS, with the metric-matched stand-ins renamed to "OpenMono Menlo", "OpenMono Consolas" and "OpenMono Courier". The previous family name is gone from the service, and test/fonts.test.ts now fails if it comes back.
  • Same letters as Desktop. src/docs/assets/fonts/OpenMono-{Regular,Bold,Italic,BoldItalic}.woff2 are the text files of the final app build (1.000, build 2026-11-19; no ligatures, every character one cell). script/openmono.py splits each into three files by the rules OpenCode Desktop's script uses: no character is left out, every style has a Cyrillic file, and the ranges around the Powerline characters are exact. The Latin file also has the six keys that shortcuts name (⌃ ⌘ ⌥ ⌫ ⎋ ⏎) and 27 common symbols (below). With the same two lists, both scripts make the same files.
  • Layout does not move. Units per em, advance (600), ascender, descender, line gap, x-height and cap height are identical, so every size, weight, tracking, line height and the fallback overrides stay as they are. Of the 1,320 characters the site served before, the upright styles change the shape of C, c, G and the letters built on them (29 characters, terminals 0.002 em longer). The italics slant 11.8° where they slanted 12°, and their C, c and G terminals move 0.02 em. ⥈ and ⬰ are now one cell wide.
  • Weights. Unchanged: Regular draws 100 to 500 and Bold draws 600 to 900. Section titles keep their 0.2 px stroke as the stand-in for Medium.
  • Ligatures. Off, as before: the source has none and the subsets keep only ccmp, locl, mark and mkmk.
  • Cyrillic. OpenMono has Cyrillic, so the Russian and Ukrainian pages now set mono text in OpenMono and not in the system font. It is a file of its own (cyrillic, in every style) so those pages fetch 18 kB and not the whole rest file. That file also has the two stress marks (U+0300 and U+0301), so a stressed letter such as у́ sets in OpenMono; a browser takes a letter and its mark from one file or falls back for both. The rest file has those marks too, so each style's cyrillic rule comes after its rest rule: a browser asks the last rule that has a character first, and ру́сский then fetches the Latin and Cyrillic files only (checked in Chromium; with the other order it also fetched the 123 kB rest file). A Latin letter that has no code point of its own with its mark, such as x́, still falls back, as on dev.
  • Every character the font has. The final build adds Greek, Vietnamese, Armenian and more, which are in the rest file (122 kB in Regular). ⇧ is in the Latin range again. The search box on every docs page shows ⌘K, which the font now has: from the rest file that one character would cost 122 kB a page, so the shortcut keys are in the Latin file and a docs page still fetches only the two Latin files.
  • Common symbols in the Latin file. For the same reason, 27 symbols that a terminal prints or that a page sets in mono are in the Latin file, which grows by 1.5 kB (Regular: 27,876 to 29,416 bytes): the status marks ✓ ✗ ✕ ✖ ⚠; the dots ∙ ⋅ of terminal recordings; the math signs ≈ ≠ ≤ ≥ ∞ √ ∑; ⋯ and �, which a changelog page has in code; and ⁰ ⁴ ⁵ ⁶ ⁷ ⁸ ⁹ ₀ ₁ σ Σ, the numbers on /font (the page sets its σ in capitals). The list comes from a scan of the rendered mono text of every page of the site and the docs in Chromium, each page in a browser context of its own. Before, /font and /changelog/v2.3.1 fetched the rest file; now no page does.
  • Docs stylesheet budget. 30,665 of 30,720 gzipped bytes (dev is at 30,492). In blocks where the font lacks only unassigned or rare code points (Greek, Armenian, phonetic letters, superscripts, currency, letterlike and technical symbols, Latin Extended-D to G, double-struck letters, legacy computing symbols) a unicode-range runs on across the gaps, up to a character another file has. The only cost is that a page using one of the lacking characters fetches the rest file before it falls back.
  • Settings. monoFontRevision goes to 3, so a mono font saved on the development server resets to OpenMono once.
  • Credits. humans.txt credits OpenMono, Iosevka by Belleve Invis, and the licence. src/asset/fonts/OpenMono-OFL.txt carries the copyright lines of the build.
  • Link cards. script/og.ts renders its four cards (/product/browse, the changelog release card, and the two legal documents) with the new files. Each font file now has a family name of its own there: Satori keeps one face per family name and weight, so under one name only the Latin file was ever used. The four cards are English and render the same bytes as before that fix. src/asset/og/release.jpg is captured again from this branch; inside the card's crop it differs from the old still only by the font. The two legal stills stay: those pages have changed since the stills were made, so a new capture changes more than the font.
  • Brand rules for agents (/brand.md). One new rule: turn OpenMono's code ligatures off, because the released family has them on and OpenCode shows none.
  • Terminal captures. script/capture-assets.ts records the Terminal screenshots and product video cuts with VHS and an installed font. Its default is now OpenMono Nerd, the terminal family: the status marks come from the font, and arrows and the ellipsis are one cell wide. VHS draws each cell on its own, so neither family shows ligatures.
  • Badges. The 160 -mono badge files are not redrawn. Their text is outlines, and only the C of OpenCode differs, by 0.002 em: 0.02 px on the 20 px badge and 0.05 px on the 44 px one.
Font bytes Before After
Regular Latin (preloaded on every page) 19,084 29,416
Bold Latin 18,700 29,060
All served files 193,076 (8 files) 728,284 (12 files)
Of those, the four rest files 113,372 523,972
Source files in the repo 250,508 856,072

The Latin files are larger because the build stores accented letters as full outlines, not as components. The rest files are larger because the font has 3,552 characters where it had 1,321; a page fetches one only when it uses one of those characters. First load of mono fonts: 29,416 bytes on the home page, 58,476 on a docs page (Regular and Bold Latin), 47,828 on the Russian home page.

Feature flag. None. The site reads no flags, and a typeface cannot be half on: both families would have to ship. The gate was the font's release, and OpenMono 1.000 is out.

Refresh the fonts after a font build, from services/site:

uvx --from 'fonttools[woff]==4.60.1' python script/openmono.py path/to/app-nerd

It reads and checks every input and builds every file in a temporary folder before it replaces anything, so a missing source, a file that is not the one-cell build, or styles whose characters differ leave the checkout untouched. With the same ranges, no other file changes.

Follow-ups, after this merges:

  • Export the 13 OG Studio cards again, with their 13 videos and 153 locale cards (src/asset/og-studio/manifest.json). They are made by hand in OG Studio and are not part of this PR.
  • Redraw the 160 -mono badge files in public/brand/badges. They were drawn with the earlier build of the same letters, so the copy that calls them OpenMono is right to within 0.002 em in one letter, the C of OpenCode.
  • Capture src/asset/og/privacy-policy.jpg and terms-of-service.jpg again, as a change of their own.
  • Capture public/brand/screenshots/opencode-terminal-{dark,light}.png (and .webp) again with script/capture-assets.ts.
  • Record the Terminal and SDK product videos and posters again.
  • When the OpenMono repository is public, link it from the Type rules in /brand.md and from humans.txt.

Companion: #64798 (the data app). The two can merge in either order.

packages/nav-menus is not in this PR. The site sets --nav-menu-mono itself, so the menus follow --font-mono and never use the package's fallback family. Until #64798 merges, that fallback still carries the old family name into the site's compiled stylesheet as a dead value; the guard test scans services/site, not that package.

How did you verify your code works?

  • bun run check at the root (lint, and typecheck of every package), which the pre-push hook also ran. bun typecheck and bun test in services/site (242 pass).
  • bun run build -- --mode dev on the current dev, which includes the docs build and its budget. Then the home page, product, Brand, legal, changelog, the font page and three docs pages in Chromium, light and dark. On each page the browser reports the drawn mono font as OpenMonoNerd-Regular or -Bold from the bundled files, no element still names the old family, and on the English pages under 0.03% of pixels differ from dev (the C, c and G shapes). With the final build, checked again on the home page, the Russian home page, the changelog, the font page and three docs pages: no mono text is drawn by a system font. With the common symbols in the Latin file, a scan of all 265 site pages and 666 docs pages finds none that fetches a rest file.
  • At 390 px, light and dark, on the home page, a docs page and the Russian home page: no page scrolls sideways, all mono text is drawn by the bundled files, and the English pages differ from the deployed dev by under 0.03% of pixels.
  • The refresh script against a folder with a source missing, with a two-cell font, and with one style short of characters: each stops with "Nothing was written" and the checkout's files keep their hashes.
  • ру́ in a browser with the old and the new Cyrillic file: the stressed letters were Menlo and are now OpenMono.
  • The four link cards from script/og.ts build and are byte-identical before and after the family names. A test line with ⥈ ⚠ ✓ and Cyrillic drew empty boxes under one family name and the glyphs under separate names. The new release still was compared with the old one and with a capture of dev.
  • A VHS capture of the same lines in OpenMono and in OpenMono Nerd, to see which one draws the terminal's symbols.
  • Not checked: Safari, Firefox, Windows and Linux fallbacks, real phones, and the pages that only exist on the development server (Settings, Design mode).

Screenshots / recordings

Before After
Home Home page before Home page after
Docs Docs page before Docs page after
Home in Russian Russian home page before Russian home page after
This branch at 390 px Light Dark
Home Home page at 390 px, light Home page at 390 px, dark
Docs Docs page at 390 px, light Docs page at 390 px, dark

The English pages differ only in the C, c and G. The Russian page shows the visible change: its mono text was the system font. Docs code blocks use the browser's own monospace font on dev today, so they do not change here.

Checklist

  • I have tested my changes locally
  • I have not included unrelated changes in this PR

simonklee pushed a commit to anomalyco/opentui that referenced this pull request Nov 19, 2026
The site moves from its own Iosevka build, OpenTUI Mono, to OpenMono,
Anomaly's monospace family. OpenMono grew out of OpenTUI Mono. It is
built on Iosevka by Belleve Invis, under the SIL Open Font License 1.1.

The font files are the ones that the OpenCode website serves. They are
subsets of the OpenMono 1.000 build, made in the `anomalyco/opencode`
repository by `services/site/script/openmono.py`. Until it merges, that
script is in the open pull request
anomalyco/opencode#64796. Each style is split by
`unicode-range`, so a page loads only the files that its text needs.

## First visit

Font bytes that a page loads with an empty cache, measured in Chromium:

| Page | `main` | This change |
|-|-|-|
| Home | 138,196 B | 54,160 B |
| Box (code, terminal frames) | 138,196 B | 54,160 B |
| Embedded terminal (diagram, terminal frame with `✓`) | 138,196 B |
88,512 B |
| Native overview (diagrams, italic text) | 219,928 B | 84,636 B |
| Keymap addons (one Cyrillic letter) | 138,196 B | 72,312 B |

The `@font-face` rules now have `unicode-range` lists, so the CSS of
`Minimal.astro` is 8.6 KB (1.7 KB with gzip). Astro inlines a stylesheet
below 4 KB and writes a larger one to a file. The home page had no
stylesheet request and now has one. A documentation page had two and now
has three.

## What changed

- `public/fonts/` has ten files: `latin`, `cyrillic`, and `rest` for
Regular and Bold, and `latin` and `rest` for Italic and Bold Italic.
`layouts/Minimal.astro` declares them as the `OpenMono` family with the
`unicode-range` of each file. It preloads Regular `latin`, where it
preloaded Regular before. `styles/terminal-illustration.css` names the
same family.
- `public/fonts/LICENSE` is the license file that comes with the files,
with one line above it that names their source.
- `.prose .box-figure pre` no longer sets `font-feature-settings:
"NWID"`. OpenTUI Mono drew arrows and geometric shapes two cells wide
and needed that feature in diagrams. OpenMono draws them one cell wide
by default.
- `bun run fonts:update <folder>` copies the files from an
`anomalyco/opencode` checkout. Then it compares the `unicode-range` of
each rule in `Minimal.astro` with `openmono.json` from that folder and
fails if they differ.
- `AGENTS.md`, two code comments, and the recordings README use the new
name.
- Sizes, weights, line heights, `font-display`, and ligature settings
are not changed. The files have no ligatures, as before.

## What was removed

- `src/font/private-build-plans.toml`, the Iosevka build plan. The site
no longer compiles a typeface.
- The build steps in `src/font/README.md`. The file now says where the
font files come from and how to update them.
- `/lab/font` (`src/pages/lab/font.astro`) and
`public/fonts/candidate/`. They compared the live files with the next
compile.

## What a reader sees

Metrics are identical in all four styles: 1000 units per em, 600
advance, ascender 965, descender −285 (`hhea` −220, line gap 65),
x-height 520, cap height 690.

OpenTUI Mono had 1,627 characters. In Regular:

| Characters | Count | Difference |
|-|-|-|
| Identical outline | 952 | None. This includes box drawing and block
elements. |
| Same shape, other curve points | 402 | None. The bounding box and the
area are equal. |
| Redrawn | 39 | The terminals of `C`, `G`, and `c`, and the letters
built from them (`Ç ç Ć ć`, Cyrillic `С с`, `¢ ©`, and more). |
| Narrower | 233 | Two cells before, one cell now: arrows (U+2190–21FF),
most geometric shapes (U+25A0–25FF), `—`, `…`, `‰`, and some math
operators. The shape is the old `NWID` form. |
| Not in the files | 1 | `⇧` (U+21E7). No page uses it. |

The files also have 43 characters that OpenTUI Mono did not have, such
as `✓ ✕ ✗ ⚠ ⚙ ⟳ ✱`. They used a fallback font before.

The identity glyphs `a g l I 1 0 8 6 9 @ { } ( ) _ *` are the same shape
in every style.

Coverage is narrower than with the old files in two cases. No page has
either one.

- Italic and Bold Italic have no Cyrillic file, so italic text in
Cyrillic uses a fallback font. Regular and Bold have Cyrillic. Keymap
addons draws its Cyrillic letter from the bundled file.
- A letter and a combining mark (U+0300–036F) are in different files. A
pair that has no precomposed character, such as `x̂`, uses a fallback
font. Precomposed letters such as `é` are in `latin`, and `e` with a
combining acute still draws as `é` from that file.

Braille patterns and CJK are in neither typeface. The browser still uses
a fallback font for them, for example in the recordings.

On seven pages at 1440px, the page height and the size of each
paragraph, code block, table, diagram, and recording are equal before
and after. The visible differences are the `C`, `G`, and `c` terminals
and the narrower symbols outside diagrams: the em dash (a paragraph in
"What's Next for OpenTUI" wraps one word earlier), `→` in one table in
Native resources, and `…`.

| | Before | After |
|-|-|-|
| Home |
![](https://github.com/user-attachments/assets/7fb03acf-d9ef-4153-b8ff-fb0d0b890f1e)
|
![](https://github.com/user-attachments/assets/328ecf9d-4ddd-472b-9404-a41382c02e9b)
|
| Embedded terminal, light |
![](https://github.com/user-attachments/assets/881e3d5e-2b37-43a6-b3c6-75dccd5f28de)
|
![](https://github.com/user-attachments/assets/8eaf3371-a917-49b5-bf66-3053fd40c4b3)
|
| Embedded terminal, dark |
![](https://github.com/user-attachments/assets/a98c745c-b893-461b-814b-647f1e4b02ef)
|
![](https://github.com/user-attachments/assets/eec3ee17-7253-4da5-bb6a-674052cf6054)
|

## Bytes in the repository

| Files | Before | After |
|-|-|-|
| Regular | 69,408 B | `latin` 27,280 B, `cyrillic` 18,152 B, `rest`
34,352 B |
| Bold | 68,788 B | `latin` 26,880 B, `cyrillic` 17,724 B, `rest` 34,212
B |
| Italic | 81,732 B | `latin` 30,476 B, `rest` 38,712 B |
| Bold Italic | 81,504 B | `latin` 30,296 B, `rest` 38,888 B |
| Candidate copies of the four files | 301,432 B | removed |
| Total | 602,864 B | 296,972 B |

## Update the fonts

```
cd packages/web
bun run fonts:update <opencode checkout>/services/site/src/asset/fonts
```

`src/font/README.md` has the details.

## Tested

From `packages/web`, as `build-web.yml` does:

- `bun run validate:docs:metadata`, `validate:docs:links`,
`validate:docs:skill`, and `validate:docs:releases` pass.
- `bun run api:check` passes.
- `bun run test:site` passes (132 tests). `bun run test:packages` (15)
and `bun test scripts/theme.test.ts` (19) pass.
- `bun run build:site` builds both documentation channels and validates
the links. The output has no reference to the old files.
- `bun run fmt:check` and `bun run lint` pass from the repository root.

With fontTools:

- Each bundled file has exactly the characters of its `unicode-range`.
The outlines, advances, and metrics are equal to the unsplit OpenMono
files.
- Every character of OpenTUI Mono except `⇧` is in a bundled Regular and
Bold file. The italics also lack Cyrillic.

In Chromium, with `bun run dev`:

- The first-visit numbers and the screenshots above.
- `CSS.getPlatformFontsForNode` reports the bundled files for body text,
headings, navigation, code, tables, diagrams, terminal frames, and
recordings. Box drawing and block elements are in `latin`, so diagrams
and terminal frames need no other file.
- `scripts/prose-layout.check.mjs` passes on five pages with text
diagrams, without the `NWID` rule.
- Nine pages have no horizontal overflow at 390px, 768px, 1025px, and
1440px.

## Not tested

- `bun run test:docs`. Four tests in `scripts/doc-visuals.test.ts` need
the native library, which I did not build. They fail the same way on
`main`.
- Safari and Firefox.
- The blue and cobalt themes.
- The deployed site.
simonklee pushed a commit to anomalyco/opentui that referenced this pull request Nov 21, 2026
This follows #2159. That change gave the site the first build of
OpenMono 1.000. This change brings the site to the final build
(2026-11-19).

The font files are again the ones that the OpenCode website serves. They
are subsets of the final OpenMono 1.000 build, made in the
`anomalyco/opencode` repository by `services/site/script/openmono.py`.
Until it merges, that script is in the open pull request
anomalyco/opencode#64796.

## What changed

- **New characters.** Each style has 3,552 characters. Regular and Bold
had 1,669, and Italic and Bold Italic had 1,363. The new ones are in
`rest`: Greek and Greek Extended, Vietnamese, Armenian, more of Latin
Extended-B and IPA, and letterlike and technical symbols. The Vietnamese
letters with two accents, such as `ấ` and `ữ`, are in the form that the
final build redrew. The earlier files did not have them.
- **Shortcut keys.** `latin` now has `⇧` and `⌃ ⌘ ⌥ ⌫ ⎋ ⏎`. #2159 listed
`⇧` as the one character of OpenTUI Mono that was not in the files.
- **Common symbols.** `latin` also has 27 common symbols: `✓ ✗ ✕ ✖ ⚠ ∙ ⋅
≈ ≠ ≤ ≥ ∞ √ ∑ ⋯ �`, `⁰ ⁴ ⁵ ⁶ ⁷ ⁸ ⁹ ₀ ₁`, and `σ Σ`. In the files from
#2159, those that existed were in `rest`. A page with `✓` no longer
loads `rest`.
- **Italic Cyrillic.** Italic and Bold Italic now have `cyrillic` files.
With this, every style has all 1,627 characters of OpenTUI Mono.
- **License.** `public/fonts/LICENSE` has Iosevka's exact copyright
line: `Copyright (c) 2015-2026, Renzhi Li (aka. Belleve Invis,
belleve@typeof.net)`. The font README gives the same name.
- **Rules.** `layouts/Minimal.astro` has twelve `@font-face` rules with
the new ranges of `openmono.json`. The `cyrillic` rule of each style is
now after its `rest` rule. Both files have the stress marks U+0300–0301,
and the browser uses the last rule that has a character. Cyrillic text
with a stress mark therefore loads only the `cyrillic` file.
- **Script.** `bun run fonts:update <folder>` copies twelve files and
also fails if the rules of a style are in another order.

The characters that the site already had keep their outline, metrics,
and advance. The exceptions are `⎇` (Bold, Italic, Bold Italic) and `⌕`
(Italic, Bold Italic). No page uses them.

## First visit

Font bytes that a page loads with an empty cache, measured in Chromium:

| Page | Live (#2159) | This change |
|-|-|-|
| Home | 54,160 B | 58,476 B |
| Box (code, terminal frames) | 54,160 B | 58,476 B |
| Native overview (diagrams, italic text) | 84,636 B | 91,360 B |
| Keymap addons (one Cyrillic letter) | 72,312 B | 76,888 B |
| Embedded terminal (terminal frame with `✓`) | 88,512 B | 58,476 B |
| Release notes 0.8.0 (`✓`) | 88,512 B | 58,476 B |

A page that has only characters of `latin` loads about 4 KB more than it
does now, because the Regular and Bold `latin` files are each about 2 KB
larger. The last two rows are smaller because `✓` is now in `latin`, so
those pages no longer load `rest`.

`rest` grew from 34 KB to 122 KB with the new scripts. A page loads it
only if its text has a character from that file. No page of the site has
one now: `✓` and the `∙ ⋅` of two recordings are in `latin`.

The CSS of `Minimal.astro` is 8,876 B. It was 8,619 B.

## What a reader sees

The existing pages do not change. On seven pages at 1440px, the layout
measurements are equal, and 29 of 32 screenshots in light and dark mode
are identical pixel for pixel. The other three differ in patches of one
glyph, and two runs of the same build differ in such patches too.

Text in the new characters now draws in the site typeface. Before, it
used a fallback font:

| Before | After |
|-|-|
|
![](https://github.com/user-attachments/assets/d75df222-f485-4666-84f5-f47664801308)
|
![](https://github.com/user-attachments/assets/b4ca9dca-879a-4505-8e17-932654e0e85b)
|

## Bytes in the repository

| Style | `latin` | `cyrillic` | `rest` |
|-|-|-|-|
| Regular | 27,280 → 29,416 B | 18,152 → 18,412 B | 34,352 → 122,432 B |
| Bold | 26,880 → 29,060 B | 17,724 → 17,952 B | 34,212 → 121,880 B |
| Italic | 30,476 → 32,884 B | new, 21,968 B | 38,712 → 139,804 B |
| Bold Italic | 30,296 → 32,764 B | new, 21,856 B | 38,888 → 139,856 B |

The total goes from 296,972 B to 728,284 B.

## Tested

From `packages/web`, as `build-web.yml` does:

- `bun run validate:docs:metadata`, `validate:docs:links`,
`validate:docs:skill`, and `validate:docs:releases` pass.
- `bun run api:check` passes.
- `bun run test:site` passes (132 tests). `bun run test:packages` (15)
and `bun test scripts/theme.test.ts` (19) pass.
- `bun run build:site` builds both documentation channels and validates
the links.
- `bun run fmt:check` and `bun run lint` pass from the repository root.

With fontTools:

- No file has a character outside the `unicode-range` of its rule. No
character is wider than one cell.
- Every character of OpenTUI Mono is in a bundled file of every style.
- The files of the four styles have the same metrics as the files from
#2159.

In Chromium, with `bun run dev`:

- The first-visit numbers and the screenshots above.
- `CSS.getPlatformFontsForNode` reports the bundled files for all text
on Home, Box, and Embedded terminal, and for all of the specimen above.
Embedded terminal and the 0.8.0 release notes request no `rest` file. On
Keymap addons, only the Korean letter uses a fallback font, as before.
- A page with only Cyrillic text and a stress mark loads the `cyrillic`
files and not `rest`.
- `scripts/prose-layout.check.mjs` passes on five pages with text
diagrams.
- Nine pages have no horizontal overflow at 390px, 768px, 1025px, and
1440px.

## Not tested

- `bun run test:docs`. Four tests in `scripts/doc-visuals.test.ts` need
the native library, which I did not build. They fail the same way on
`main`.
- Safari and Firefox.
- The blue and cobalt themes.
- The deployed site.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant