Skip to content

Add font and scale settings#236

Open
saghen wants to merge 4 commits intofriedow:mainfrom
saghen:font-config
Open

Add font and scale settings#236
saghen wants to merge 4 commits intofriedow:mainfrom
saghen:font-config

Conversation

@saghen
Copy link
Contributor

@saghen saghen commented Apr 25, 2025

Continuation of #143. Adds settings to configure the font family and size, as well as a global scaling option. I configure scaling per app since setting it globally performs poorly in many apps I use on linux. Notably, setting application(...).scale_factor(...) didn't seem to work on my system, so I resorted to scaling the REM and width/height.

@saghen
Copy link
Contributor Author

saghen commented Apr 26, 2025

It seems like without a nerd font, it will render the icons correctly as long as another font includes the code point. I've added the symbols nerd font and loaded it when the font isn't the default, wdyt? Although I prefer a monospace font, I believe some users prefer a sans font (i.e. their system default) which would have to be patched to include a nerd font otherwise.

@friedow
Copy link
Owner

friedow commented Apr 26, 2025

In my opinion including only the symbols is a very good solution. Since this works, I would like centerpiece to transition to use the system default monospace font. This way we could get rid of packaging Fira Code with centerpiece.

This is kinda a breaking UI change but if we transition to the default monospace font it is probably fine for most people.

@friedow
Copy link
Owner

friedow commented Apr 29, 2025

Loading the symbols does not work properly yet. I use a monospace font without nerdfont symbols. Those nerdfont symbols arent being displayed for me even though they are loaded. I wonder if this needs some kind of font fallback definition to work.

Here is what it looks like for me:
image

You can find my font configuration over here:
https://github.com/friedow/dotfiles/blob/main/modules/theme/default.nix#L15-L35

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants