Repository navigation
List installed fonts in the font pickers - #422
Merged
Merged
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.csspinned--editor-font-family. And there was no way to use a font installed on the computer.system_fontscommand 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 equaliandMadvances (FreeMono lacks the flag). The scan runs once per launch.fonts.app(sys:Family), and its stack ends in the pairing's face, so an uninstalled font falls back cleanly.--font-monounless Separate fonts sets them.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.