vhakulinen / gnvim

GUI for neovim, without any web bloat
MIT License
1.86k stars 68 forks source link

Font::from_guifont does not handle list #181

Closed wezm closed 1 year ago

wezm commented 3 years ago

guifont can be set to a list of fonts but gnvim only supports parsing a single font

https://github.com/vhakulinen/gnvim/blob/6ba47373545c6e9be3677a3ae695415809cf2fdf/src/ui/font.rs#L33

                    *'guifont'* *'gfn'*
                           *E235* *E596*
'guifont' 'gfn'     string  (default "")
            global
    This is a list of fonts which will be used for the GUI version of Vim.
    In its simplest form the value is just one font name.  When
    the font cannot be found you will get an error message.  **To try other
    font names a list can be specified, font names separated with commas.**
    The first valid font is used.
vhakulinen commented 1 year ago

Gnvim was rewritten from ground up for gtk4, and it now supports setting multiple fonts through guifont. You can see the details for setting the font here: https://docs.gtk.org/Pango/type_func.FontDescription.from_string.html