0

For debian9, the setting in .vimrc take effect for gvim.

set guifont=Bitstream\ Vera\ Sans\ Mono\ 14

For win7,the setting in _vimrc take no effect for gvim at all.
I open gvim in my win7,

:set guifont?

The result is Bitstream Vera Sans Mono,but i find that the character inputed in my gvim in win7 is not Bitstream Vera Sans Mono,why? How to set gui's font in win7

2

See: :help guifont:

[...]

The font name depends on the GUI used.

[...]

For the Win32 GUI

  • takes these options in the font name:>

    • hXX - height is XX (points, can be floating-point)
    • wXX - width is XX (points, can be floating-point)
    • b - bold
    • i - italic
    • u - underline
    • s - strikeout
    • cXX - character set XX. Valid charsets are: ANSI, ARABIC, BALTIC, CHINESEBIG5, DEFAULT, EASTEUROPE, GB2312, GREEK, HANGEUL, HEBREW, JOHAB, MAC, OEM, RUSSIAN, SHIFTJIS, SYMBOL, THAI, TURKISH, VIETNAMESE ANSI and BALTIC. Normally you would use "cDEFAULT".

    Use a ':' to separate the options.

  • A '_' can be used in the place of a space, so you don't need to use backslashes to escape the spaces.

  • Examples:

    :set guifont=courier_new:h12:w5:b:cRUSSIAN
    :set guifont=Andale_Mono:h7.5:w4.5
    

Try this:

set guifont=Bitstream_Vera_Sans_Mono:h14

Note also:

For Win32, GTK, Motif, Mac OS and Photon:

 :set guifont=*

will bring up a font requester, where you can pick the font you want.

After doing so, you can check the output of :set guifont? again to see the correct format.

1

You're using the right command. You need to install the font in a way that is recognized by Windows itself and you need to specify the correct name. See :help guifont for the naming conventions.

Also, you can see all available fonts with :set guifont=*. This will open a standard font-chooser dialog.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.