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:
parent
d81c943905
commit
f2a1ef12cd
13 changed files with 70 additions and 17 deletions
|
|
@ -29,6 +29,7 @@
|
|||
"@codemirror/merge": "^6.12.3",
|
||||
"@codemirror/state": "^6.7.6",
|
||||
"@codemirror/view": "^6.43.14",
|
||||
"@fontsource/ibm-plex-mono": "^5.3.0",
|
||||
"@lezer/highlight": "^1.2.5",
|
||||
"@lucide/vue": "^1.57.0",
|
||||
"@tauri-apps/api": "^2.12.3",
|
||||
|
|
|
|||
8
ui/pnpm-lock.yaml
generated
8
ui/pnpm-lock.yaml
generated
|
|
@ -47,6 +47,9 @@ importers:
|
|||
'@codemirror/view':
|
||||
specifier: ^6.43.14
|
||||
version: 6.43.14
|
||||
'@fontsource/ibm-plex-mono':
|
||||
specifier: ^5.3.0
|
||||
version: 5.3.0
|
||||
'@lezer/highlight':
|
||||
specifier: ^1.2.5
|
||||
version: 1.2.5
|
||||
|
|
@ -284,6 +287,9 @@ packages:
|
|||
'@noble/hashes':
|
||||
optional: true
|
||||
|
||||
'@fontsource/ibm-plex-mono@5.3.0':
|
||||
resolution: {integrity: sha512-eTgnZjZEGk1QtD3ZstF+Vclo2HLAni8YMy34/DxllwZvyz1lR/1RF/xTiAquOBO7MvqBx8D2Ig2WCPMVfdZu7Q==}
|
||||
|
||||
'@humanfs/core@0.19.2':
|
||||
resolution: {integrity: sha512-UhXNm+CFMWcbChXywFwkmhqjs3PRCmcSa/hfBgLIb7oQ5HNb1wS0icWsGtSAUNgefHeI+eBrA8I1fxmbHsGdvA==}
|
||||
engines: {node: '>=18.18.0'}
|
||||
|
|
@ -1620,6 +1626,8 @@ snapshots:
|
|||
|
||||
'@exodus/bytes@1.16.0': {}
|
||||
|
||||
'@fontsource/ibm-plex-mono@5.3.0': {}
|
||||
|
||||
'@humanfs/core@0.19.2':
|
||||
dependencies:
|
||||
'@humanfs/types': 0.15.0
|
||||
|
|
|
|||
|
|
@ -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)" },
|
||||
|
|
|
|||
|
|
@ -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";
|
||||
|
|
|
|||
|
|
@ -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";
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@
|
|||
"--lt-error": "#f2836b",
|
||||
"--lt-fg": "#ebe5dc",
|
||||
"--lt-fg-muted": "#9e9499",
|
||||
"--lt-font-mono": "ui-monospace, \"Cascadia Code\", Menlo, Consolas, monospace",
|
||||
"--lt-font-mono": "\"IBM Plex Mono\", ui-monospace, \"Cascadia Code\", Menlo, Consolas, monospace",
|
||||
"--lt-font-size-editor": "14px",
|
||||
"--lt-font-size-small": "12px",
|
||||
"--lt-font-size-ui": "13px",
|
||||
|
|
@ -93,7 +93,7 @@
|
|||
"--lt-error": "#b23a29",
|
||||
"--lt-fg": "#2a2427",
|
||||
"--lt-fg-muted": "#675d61",
|
||||
"--lt-font-mono": "ui-monospace, \"Cascadia Code\", Menlo, Consolas, monospace",
|
||||
"--lt-font-mono": "\"IBM Plex Mono\", ui-monospace, \"Cascadia Code\", Menlo, Consolas, monospace",
|
||||
"--lt-font-size-editor": "14px",
|
||||
"--lt-font-size-small": "12px",
|
||||
"--lt-font-size-ui": "13px",
|
||||
|
|
@ -165,7 +165,7 @@
|
|||
"--lt-error": "#f48a78",
|
||||
"--lt-fg": "#f0e6dc",
|
||||
"--lt-fg-muted": "#a8969f",
|
||||
"--lt-font-mono": "ui-monospace, \"Cascadia Code\", Menlo, Consolas, monospace",
|
||||
"--lt-font-mono": "\"IBM Plex Mono\", ui-monospace, \"Cascadia Code\", Menlo, Consolas, monospace",
|
||||
"--lt-font-size-editor": "14px",
|
||||
"--lt-font-size-small": "12px",
|
||||
"--lt-font-size-ui": "13px",
|
||||
|
|
@ -237,7 +237,7 @@
|
|||
"--lt-error": "#f08a7a",
|
||||
"--lt-fg": "#e2e8e6",
|
||||
"--lt-fg-muted": "#8e9ca3",
|
||||
"--lt-font-mono": "ui-monospace, \"Cascadia Code\", Menlo, Consolas, monospace",
|
||||
"--lt-font-mono": "\"IBM Plex Mono\", ui-monospace, \"Cascadia Code\", Menlo, Consolas, monospace",
|
||||
"--lt-font-size-editor": "14px",
|
||||
"--lt-font-size-small": "12px",
|
||||
"--lt-font-size-ui": "13px",
|
||||
|
|
@ -309,7 +309,7 @@
|
|||
"--lt-error": "#ad3524",
|
||||
"--lt-fg": "#221d20",
|
||||
"--lt-fg-muted": "#625b5f",
|
||||
"--lt-font-mono": "ui-monospace, \"Cascadia Code\", Menlo, Consolas, monospace",
|
||||
"--lt-font-mono": "\"IBM Plex Mono\", ui-monospace, \"Cascadia Code\", Menlo, Consolas, monospace",
|
||||
"--lt-font-size-editor": "14px",
|
||||
"--lt-font-size-small": "12px",
|
||||
"--lt-font-size-ui": "13px",
|
||||
|
|
@ -381,7 +381,7 @@
|
|||
"--lt-error": "#a63424",
|
||||
"--lt-fg": "#25261f",
|
||||
"--lt-fg-muted": "#5b5a4f",
|
||||
"--lt-font-mono": "ui-monospace, \"Cascadia Code\", Menlo, Consolas, monospace",
|
||||
"--lt-font-mono": "\"IBM Plex Mono\", ui-monospace, \"Cascadia Code\", Menlo, Consolas, monospace",
|
||||
"--lt-font-size-editor": "14px",
|
||||
"--lt-font-size-small": "12px",
|
||||
"--lt-font-size-ui": "13px",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue