Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why doesn't gvim set the font correctly?

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. enter image description here

However when I correct the line to set guifont=LiberationMono:h12 gvim does not complain but the font gets changed to this:

enter image description here

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?

like image 522
minerals Avatar asked Feb 13 '23 17:02

minerals


1 Answers

I managed to resolve the issue by correcting the font setting in ~/.vimrc

set guifont=LiberationMono\ 12

enter image description here

like image 118
minerals Avatar answered Feb 27 '23 05:02

minerals