Skip to content

List installed fonts in the font pickers - #422

Merged
broisnees merged 1 commit into
nightlyfrom
feat/system-fonts
Nov 24, 2026
Merged

broisnees merged 1 commit into
nightlyfrom
feat/system-fonts

Conversation

@broisnees

Copy link
Copy Markdown
Collaborator

The font setting had two problems on my machine. Picking "Source Code Pro" changed the data grid but left the SQL editor and terminal in JetBrains Mono, because app.css pinned --editor-font-family. And there was no way to use a font installed on the computer.

  • Installed fonts. A new system_fonts command finds the font files with fontdb and reads each with ttf-parser. It keeps families that draw Latin letters through a Unicode cmap, so symbol, dingbat and emoji faces drop out. It counts a family as fixed-width from its fixed-pitch flag or equal i and M advances (FreeMono lacks the flag). The scan runs once per launch.
  • Font menu. The pairings come first, each described by the faces it sets ("Inter + Source Code Pro"). Below them are "Monospace on this computer: the whole app" and "On this computer: the interface". Each name is drawn in its own face. A system font is stored as fonts.app (sys:Family), and its stack ends in the pairing's face, so an uninstalled font falls back cleanly.
  • Separate fonts pickers list installed families under "On this computer" (only fixed-width ones for the editor and terminal).
  • Editor and terminal now follow --font-mono unless Separate fonts sets them.
  • Family names are stripped of quotes, backslashes and braces before they reach CSS.

Checked in the app on Linux: 27 families listed, symbol fonts gone, Liberation Mono applied to the sidebar, menus, grid and SQL editor, and Source Code Pro now in both the grid and the editor. npm test, svelte-check, design lint and the new Rust tests pass.

The Font menu now offers every family installed on the machine, after
the pairings, each name drawn in its own face. A fixed-width family sets
the whole app; any other sets the interface and keeps data and code in
the pairing's mono. The Separate fonts pickers list them too.

system_fonts finds the files with fontdb and reads each with ttf-parser,
keeping families that draw Latin letters through a Unicode cmap (symbol,
dingbat and emoji faces drop out) and judging fixed width from the i and
M advances as well as the fixed-pitch flag.

The SQL editor and the terminal no longer pin JetBrains Mono in app.css,
so they follow the Font setting like the data grid does. Pairings now
describe themselves by the faces they set.
@broisnees broisnees added the release:skip Merge into nightly without a version bump (docs, CI, chores) label Nov 24, 2026
@broisnees
broisnees merged commit e4f85fc into nightly Nov 24, 2026
1 check passed
@broisnees
broisnees deleted the feat/system-fonts branch November 24, 2026 10:03
@github-actions github-actions Bot locked and limited conversation to collaborators Nov 24, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

release:skip Merge into nightly without a version bump (docs, CI, chores)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant