'guifont' works only in gvim. If has(gui_running) is false, it will
have no effect. Vim running in a terminal will use whatever font the
terminal is using.
This said, even in gvim it is better to use a monospaced font, because
gvim has fixed-size character cells and uses two cells for "wide" CJK
characters and one cell for everything else except hard tabs and
"unprintable" characters. With a proportional font, small i's and l's
(and other narrow letters) will look too wide apart and small m's (and
other wide letters) will look cramped.
It also doesn't work to set the option twice in different format. You might use:
if has('gui_running')
if has('gui_gtk3') || has('gui_gtk2') " GTK1 (obsolete) uses a
different format
set gfn=Source\ Code\ Pro\ 10
elseif has('win32') || has('macunix') " 'win32' includes win64
set gfn=Source_Code_Pro:h10
endif
endif
(I'm not sure how to format it for other GUIs e.g. Athena, Motif, etc.
but if you do you could add one or more additional :elseif clause
inside the second :if).
If Source Code Pro is not installed on _all_ your systems it won't
always be found; in that case you may have to use different fonts for
GTK2/GTK3 OT1H and for Windows OTOH.
Once gvim has started, you may want to type
:set gfn?
(followed by hitting the Enter key of course) to see which 'guifont' is in use.
Best regards,
Tony.
> --
> --
> You received this message from the "vim_use" maillist.
> Do not top-post! Type your reply below the text you are replying to.
> For more information, visit
http://www.vim.org/maillist.php
>
> ---
> You received this message because you are subscribed to the Google Groups "vim_use" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to
vim_use+u...@googlegroups.com.
> To view this discussion on the web visit
https://groups.google.com/d/msgid/vim_use/2778d505-75e6-45ed-8965-57c2952c41ddn%40googlegroups.com.