Per-font settings #2973
Replies: 3 comments
-
To expand on the config syntax problem: I'm very iffy about the idea of inventing a lot of syntax for the config in general. I feel like the config should either be extremely simple or else use a pre-established syntax. In an ideal world, we would have units and obvious expressions, so you could do something like
|
Beta Was this translation helpful? Give feedback.
-
And as for the undesirably small nerd font (and other) glyphs, another thing would be allowing a (perhaps configurable per font or codepoint range) rendering mode that expands glyphs to fill their available space. I've played with this in the past, and I think it's what Kitty does for nerd font glyphs. |
Beta Was this translation helpful? Give feedback.
-
Great proposal! I see problems with Japanese fonts when dlig is activated, but can only deactivate it globally. |
Beta Was this translation helpful? Give feedback.
-
This is a proposal to allow configuring font settings per specified font in the fallback chain. This includes:
Motivation
One word: Control.
Currently, if using two different fonts, you're at the mercy of the individual fonts to determine their relative sizes and proportions. This is not ideal when using languages with mixed scripts or just when trying to customize things to use a different font for, e.g., italics. Getting fonts to look as best as possible together requires full control over each font, and currently our config does not allow for this.
Also: Nerd Font Symbols
Very much related to this, I think we should separate the nerd font symbols from our embedded JB Mono, instead use a symbols only nerd font and allow adjusting its scale (perhaps with a dedicated config option), since it's a common complaint that nerd font icons aren't as large as desired.
If, in the per-font adjustments, the builtin fonts could be referred to by generic names (e.g.
builtin
,builtin-symbols
,builtin-emoji
) that would allow the user to adjust them to their liking. If we introduced anoffset
adjustment (we should!) this would also allow behavior like centering emojis by adding a horizontal offset.A lot of requested behaviors can be achieved generically with this proposal, it offers a high level of control for users who want to make everything just so without entailing significant technical debt for us, which feels ideal.
Config syntax
That's the sticking point, isn't it? I'm not really sure what the cleanest way to approach this would be. Maybe (unfortunately) just something akin to the CSS
font
shorthand property?(A separate but related idea:) Take lessons from the web
The web has
font-size-adjust
to allow better control and harmonization of fallback font glyphs with the main intended font. This is good, and some form of this in Ghostty would be great!Related
Sorry if this proposal is a little disjointed. If you have any questions, I can clarify and expand on anything I didn't make clear.
Beta Was this translation helpful? Give feedback.
All reactions