Why doesn't gvim set the font correctly? - vim

I am trying to configure gvim font on linux in .vimrc but it produces strange results.
To make gvim use "Liberation Mono" I added set guifont=LiberationMono: h12. It gets applied but does not recognize :h12 option and output:
Error detected while processing /home/tastyminerals/.vimrc:
line 44:
E518: Unknown option: h12
But I am ok with the result since the font gets applied.
However when I correct the line to set guifont=LiberationMono:h12 gvim does not complain but the font gets changed to this:
This is not "Liberation Mono" of course, this thing happens with any other font I try to use.
Why does the font get changed to some strange monospaced variant? How can I configure the font correctly?

I managed to resolve the issue by correcting the font setting in ~/.vimrc
set guifont=LiberationMono\ 12

Related

How do you change the font size in neovim?

I only case about the font size, I want nothing to do with the font other than its size set guifont makes me put in a font, therefor its useless to me.
Update: all of the answers here weren't what I was asking for but I gave up on trying to fix it and moved on to using vim on Cmder.
For nvim-qt used in Windows, the following command works after nvim-qt has started:
execute join(["GuiFont! ", split(GuiFont, ":")[0], ":h14"], "")
With your font size in place of 14.
To set the font size at start, you have to use ginit.vim instead of init.vim, since init.vim starts before the GUI is loaded. Location of ginit.vim is C:\Users[User]\AppData\Local\nvim.

Godot script editor font won't change despite setting new ttf file

I can't seem to change the font in Godot's script editor. I want to change it to the monaco_linux.ttf I downloaded. I've specified which file to use, but the font only seems to increase in size a bit when I set it.
How can I change the font in Godot's script editor?
Editor Font Setting:
Editor >> Editor Settings >> Code Font >> Path/To/ttf
It seems like the font wasn't working because I was trying to use size 14 font. When I switched to size 16, it worked fine..

Vim using wrong colors

I have a problem with my vim and terminal configurations.
I am on Fedora Linux 27, run i3 and the gnome-terminal. I want to use the srcery color scheme (GH page). On GVim it works perfectly, right out the box. However, on the terminal it doesn't look as good. Srcery isn't the only color scheme with this issue, virtually all Base16 color schemes and all others that use 256 colors suffer from the same problem.
What I find bizarre, is that my $TERM variable is set to xterm-256color, tput colors gives out 256, and even vim itself claims to have a t_Co set to 256. I can do things like make the background of vim transparent, which then works properly.
you can see the color scheme working properly in GVim
a comparison to normal vim.
I have my gnome-terminal colors set to the srcery colors as well, there's a script on the GH page to create a srcery profile, which i am using. Alas, that does not help with my issue either.
Currently, I don't know how i could enable vim to correctly display my color scheme
Any help you could provide would be greatly, greatly appreciated.

Powerline/arrowline arrows are too small in urxvt

I first tried to install powerline on my computer and had problems with the arrows not rendering correctly which was easily corrected by installing a patched font. However, although the arrow symbols were rendered correctly they were much smaller than they were supposed to be.
This problem persisted when I switched from powerline to airline. I found that the problem only existed in urxvt. Gnome-terminal rendered the arrow size correctly, but placed the arrows where offset slightly from their proper positions on the line.
Here are the relevant entries in my ~/.vimrc file:
set termfont=Liberation\ Mono\ for\ Powerline\ 10
let g:airline_powerline_fonts = 1
This patched fonts method is a fallback method which works for every terminal, with the exception of rxvt. It is not about the powerline theme, it is about the font size. It doesn't work with 10. Possible solutions can be found here or here.

List of fonts available in gvim

I know I can set fonts for gvim using something like set guifont=Menlo\ Regular:h14. I have the following questions
Is there a wiki where I can see what all fonts are supported?
I want to set my font to "Lucida Sans Typewriter". I tried set guifont=Lucida Sans Typewriter\ Regular:h14, but it gave me an error when I opened a file using gvim. Error is "E518: Unknown option: Sans"
I also tried to increase the font size using set guifont=Sans\ Regular:h14, but looks like it is stuck at font size 11. I am trying this on macvim.
You need to backslash all of the spaces in the font name, not just the last one.
You can :set guifont=* to open a font chooser with the fonts available on your system. Then after you pick one you like you can :set guifont? to read back the value you need to put in your .vimrc.

Resources