Thursday, December 31, 2009

Re: How to compile with guifont ?

On 30/11/09 14:59, Timothy Madden wrote:
> Hello
>
> I compiled vim on a debian server and installed in in my home folder
> (~/usr/local),
> but the resulting executable can see no fonts when I press Tab on
> :set guifont=<Tab>
> and the default font is looking too condensed. The Edit menu has no GUI
> Font entry.
>
> I use ssh -Y to run gvim on my local desktop (with Ubuntu 9.10).
>
> fc-list shows many, many
> fonts installed (also locally in my home folder) on the server, and the
> desktop machine also
> has a GUI desktop with all the fonts.
>
> My :version is
> :version
> VIM - Vi IMproved 7.2 (2008 Aug 9, compiled Nov 27 2009 14:45:34)
> Compiled by adrianc@web3.storm.lan
> Normal version with X11-Athena GUI. Features included (+) or not (-):
[...]

Any Vim GUI can set the font; the problem is that only some of them (not
including yours, apparently) can tell you from which fonts it is
possible to choose. So you'll have to guess.

If you have the LucidaTypewriter font installed (on the computer where
gvim is running), you might try

:set gfn=-*-lucidatypewriter-medium-r-normal-*-*-90-*-*-m-*-*

or else, if you have a Courier font installed there, you might try

:set gfn=-*-courier-medium-r-normal-*-*-90-*-*-m-*-*

(where 90 is the size, in tenths of point I think: the larger the
number, the bigger the font). Similarly for other font faces: I'm just
mentioning these two because they are fairly common, so there's a
substantial chance that you've got them. The -m- near the end is
essential: it means "monotype" (i.e. fixed-width); Vim won't use any
other kind of font (except on GTK2, where other kinds look ugly anyway).

Note that if in the meantime you have installed a GTK2 version of Vim,
the above settings won't work (but GTK2 gvim has the nice ":set gfn=*"
menu, so this whole discussion is moot in that case).

For more details, including how to set the font in a vimrc which is to
be used on various versions of gvim and possibly on various OSes, see
http://vim.wikia.com/wiki/Setting_the_font_in_the_GUI


Best regards,
Tony.
--
To understand this important story, you have to understand how the
telephone company works. Your telephone is connected to a local
computer, which is in turn connected to a regional computer, which is
in turn connected to a loudspeaker the size of a garbage truck on the
lawn of Edna A. Bargewater of Lawrence, Kan.

Whenever you talk on the phone, your local computer listens in. If it
suspects you're going to discuss an intimate topic, it notifies the
computer above it, which listens in and decides whether to alert the
one above it, until finally, if you really humiliate yourself, maybe
break down in tears and tell your closest friend about a sordid
incident from your past involving a seedy motel, a neighbor's spouse,
an entire religious order, a garden hose and six quarts of tapioca
pudding, the top computer feeds your conversation into Edna's
loudspeaker, and she and her friends come out on the porch to listen
and drink gin and laugh themselves silly.
-- Dave Barry, "Won't It Be Just Great Owning Our Own
Phones?"

--
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php

No comments:

Post a Comment