kovidgoyal / kitty

Cross-platform, fast, feature-rich, GPU based terminal
https://sw.kovidgoyal.net/kitty/
GNU General Public License v3.0
23.88k stars 964 forks source link

Update docs with info that fontconfig fonts.conf is Linux specific #6868

Closed mikesmithgh closed 9 months ago

mikesmithgh commented 9 months ago

Is your feature request related to a problem? Please describe.

I was reading the docs at https://sw.kovidgoyal.net/kitty/faq/#kitty-is-not-able-to-use-my-favorite-font and was attempting to use ~/.config/fontconfig/fonts.conf to set FiraCodeNerdFont-Regular.ttf as a monospace font. But, I am on MacOS and it appears that it uses core text instead of fontconfig https://github.com/kovidgoyal/kitty/blob/master/kitty/fonts/list.py#L12 so I am unable to modify those values.

Describe the solution you'd like I think a note on the docs saying that the fontconfig is specific to Linux and doesn't work on MacOS is good enough.

Maybe (not sure if it is worth the effort) add a config value to kitty conf to let you specify fonts that should be used by Kitty. This might cause problems or not make sense, I'm not sure. This way it would detect the Nerd Font during font fallback without me explicitly setting the symbol_map.

Describe alternatives you've considered I explicitly set symbol_map to use FiraCode Nerd Font to properly display the glyphs.

Additional context There is a FiraCode Monospaced Nerd Font available, but I prefer the Regular font because it renders some glyphs across two cells making it look a bit better for me.

mikesmithgh commented 9 months ago

Actually I just saw

On Linux you can list all monospace fonts with:

so maybe I just missed it 😂. Leaving open just in case you want to do anything with it, but feel free to close.

kovidgoyal commented 9 months ago

You shouldnt use the patched fira code for nerd font symbols. Just install the redular nerd font as documented in the FAQ and kitty will pick up the symbols automatically, if it doesnt then you can use symbol_map, which can be needed if there is more than one font on your system providing glyphs for the same character.