T1: bundle IBM Plex Mono as the code font, italic comments (D28)

Daniel chose IBM Plex Mono from Amy's comparison of four free fonts. It
ships from @fontsource (Latin and Latin Extended, 400/700 with italics)
and leads font-mono for the editor and the terminal; the UI keeps the
system font. OFL-1.1 is allowed for this one package only
(PACKAGE_EXCEPTIONS in xtask/src/licences.rs, comment in deny.toml).
NOTICE, ASSETS.md and docs/themes.md updated.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
danny 2026-11-06 19:16:10 +01:00
parent d81c943905
commit f2a1ef12cd
13 changed files with 70 additions and 17 deletions

View file

@ -22,12 +22,13 @@ import { gitGutterExtensions } from "./gitGutter";
/**
* Colours of the highlight classes (`language.ts`), one `--lt-syntax-*`
* token each, spelled out so the theme tests can check every token name.
* Comments are set in italic, the bundled code font's real italic (D28).
*/
const syntaxColours: Record<`.${typeof SYNTAX_CLASS}${SyntaxToken}`, { color: string }> = {
const syntaxColours: Record<`.${typeof SYNTAX_CLASS}${SyntaxToken}`, { color: string; fontStyle?: string }> = {
".lt-syntax-keyword": { color: "var(--lt-syntax-keyword)" },
".lt-syntax-string": { color: "var(--lt-syntax-string)" },
".lt-syntax-number": { color: "var(--lt-syntax-number)" },
".lt-syntax-comment": { color: "var(--lt-syntax-comment)" },
".lt-syntax-comment": { color: "var(--lt-syntax-comment)", fontStyle: "italic" },
".lt-syntax-variable": { color: "var(--lt-syntax-variable)" },
".lt-syntax-function": { color: "var(--lt-syntax-function)" },
".lt-syntax-type": { color: "var(--lt-syntax-type)" },

View file

@ -1,7 +1,18 @@
/**
* Entry point of the Lutra frontend: creates the Vue app with Pinia and
* mounts it on `#app`.
* mounts it on `#app`. Loads Lutra's bundled code font, IBM Plex Mono
* (OFL-1.1, owner decision D28), for the editor and the terminal: regular,
* bold and their italics, in the Latin and Latin Extended subsets, so the
* app needs no network and comments get a real italic.
*/
import "@fontsource/ibm-plex-mono/latin-400.css";
import "@fontsource/ibm-plex-mono/latin-400-italic.css";
import "@fontsource/ibm-plex-mono/latin-700.css";
import "@fontsource/ibm-plex-mono/latin-700-italic.css";
import "@fontsource/ibm-plex-mono/latin-ext-400.css";
import "@fontsource/ibm-plex-mono/latin-ext-400-italic.css";
import "@fontsource/ibm-plex-mono/latin-ext-700.css";
import "@fontsource/ibm-plex-mono/latin-ext-700-italic.css";
import { createPinia } from "pinia";
import { createApp } from "vue";
import App from "./App.vue";

View file

@ -81,7 +81,7 @@ export const FONT_FAMILY_KEY = "editor.fontFamily";
export const FONT_FAMILY_TOKEN = "--lt-font-mono";
/** Fonts behind a chosen family, as `font-mono` in `crates/engine/src/theme.rs`. */
export const MONO_FALLBACK = 'ui-monospace, "Cascadia Code", Menlo, Consolas, monospace';
export const MONO_FALLBACK = '"IBM Plex Mono", ui-monospace, "Cascadia Code", Menlo, Consolas, monospace';
/** Key of the editor line height setting, in percent of the font size. */
export const LINE_HEIGHT_KEY = "editor.lineHeight";