Open sajadspeed opened 11 months ago
fc-list does list the fonts, but if GuiFont is failing either there is a problem with the font itself (usually different size for different variants), or some issue with the Qt font metrics code.
We keep a little binary in src/gui/shellwidget/fontinfo.cpp that prints out the font metrics reported by Qt.
As workaround you can also force the font using GuiFont! fontname
.
How to force the font by using lua?
I use lua vim.opt.guifont="<font-name>"
but I got an error like this:
The lua code would be
vim.cmd('GuiFont ...')
If you are running this from init.lua instead of ginit.vim, then you will need something like an autocommand for UIEnter
.
It seems there is no command called GuiFont
Both :lua vim.cmd('GuiFont')
and :GuiFont
doesn't work
Am I doing anything wrong?
I got it, nvim_gui_shim.vim
is required. and somehow I haven't got one.
I got it,
nvim_gui_shim.vim
is required. and somehow I haven't got one.
Usually you don't need to set it up manually, check its path in https://github.com/equalsraf/neovim-qt#why-are-the-gui-commands-missing
To force the font by using lua, use this lua vim.rpcnotify(0, 'Gui', 'Font', <font-name>, "!")
.
Usually you don't need to set it up manually, check its path in https://github.com/equalsraf/neovim-qt#why-are-the-gui-commands-missing
I checked, and it just wasn't there, I download one from the repo, and everything is fine now, thanks.
That sounds like it is looking for it in the wrong place. If you are building from source it would be in src/gui/runtime. If you installed from some package, it sounds broken, where did you install from?
I use NotoSansM Nerd Font Mono
and is ok. thank you all for your answeres.
I assume it is this font https://github.com/ryanoasis/nerd-fonts/tree/master/patched-fonts/Noto/Sans-Mono is that correct?
I assume it is this font https://github.com/ryanoasis/nerd-fonts/tree/master/patched-fonts/Noto/Sans-Mono is that correct?
Yes, I also use this font.
I want Noto Sans Mono font:
:GuiFont Noto Sans Mono
But i got this error:
Noto Sans Mono is not a fixed pitch font
My Fonts:
fc-list | grep NotoSansMono