Loading ...
Sorry, an error occurred while loading the content.

Re: How to compile with guifont ?

Expand Messages
  • Tony Mechelynck
    ... [...] 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
    Message 1 of 9 , Dec 31, 2009
    • 0 Attachment
      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@...
      > 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
    • Dominique PellĂ©
      ... :help guifont says... ====================================== For Win32, GTK, Mac OS and Photon: ...
      Message 2 of 9 , Jan 1, 2010
      • 0 Attachment
        Matt Wozniski wrote:

        > On Wed, Dec 2, 2009 at 8:27 AM, Timothy Madden wrote:
        >> :set guifont=*
        >>
        >> Works on Win32, GTK, Mac OS and Photon. Looks like I have none of
        >> these.
        >> Thank you for the answers. I think I have to leave this problem as it
        >> is for
        >> now ...
        >
        > It also works fine for my gvim, which is X11-Motif... I'd be really
        > surprised if it doesn't work with X11-Athena...
        >
        > ~Matt


        ":help 'guifont'" says...
        ======================================
        For Win32, GTK, Mac OS and Photon: >
        :set guifont=*
        < will bring up a font requester, where you can pick the font you want.
        ======================================

        ... which implicitly means that ":set guifont=*" is not possible for
        Athena GUI. And "set guifont=*" does not work indeed with Athena
        GUI. It gives:

        E236: Font "*" is not fixed-width
        E596: Invalid font(s): guifont=*

        Motif is not listed either, but doing ":guifont=*" with Motif does
        bring a popup window to chose the font. So I think Motif should
        be listed in the help page:

        $ diff -c options.txt.orig options.txt
        *** options.txt.orig 2010-01-01 11:39:25.502514991 +0100
        --- options.txt 2010-01-01 11:39:31.377465863 +0100
        ***************
        *** 3250,3256 ****
        the case of X). The font names given should be "normal" fonts. Vim
        will try to find the related bold and italic fonts.

        ! For Win32, GTK, Mac OS and Photon: >
        :set guifont=*
        < will bring up a font requester, where you can pick the font you want.

        --- 3250,3256 ----
        the case of X). The font names given should be "normal" fonts. Vim
        will try to find the related bold and italic fonts.

        ! For Win32, GTK, Motif, Mac OS and Photon: >
        :set guifont=*
        < will bring up a font requester, where you can pick the font you want.



        -- Dominique

        --
        You received this message from the "vim_use" maillist.
        For more information, visit http://www.vim.org/maillist.php
      • Bram Moolenaar
        ... I ll change it, thanks. -- From know your smileys : O:-) Saint /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net ///
        Message 3 of 9 , Jan 6, 2010
        • 0 Attachment
          Dominique Pelle wrote:

          > ":help 'guifont'" says...
          > ======================================
          > For Win32, GTK, Mac OS and Photon: >
          > :set guifont=*
          > < will bring up a font requester, where you can pick the font you want.
          > ======================================
          >
          > ... which implicitly means that ":set guifont=*" is not possible for
          > Athena GUI. And "set guifont=*" does not work indeed with Athena
          > GUI. It gives:
          >
          > E236: Font "*" is not fixed-width
          > E596: Invalid font(s): guifont=*
          >
          > Motif is not listed either, but doing ":guifont=*" with Motif does
          > bring a popup window to chose the font. So I think Motif should
          > be listed in the help page:
          >
          > $ diff -c options.txt.orig options.txt
          > *** options.txt.orig 2010-01-01 11:39:25.502514991 +0100
          > --- options.txt 2010-01-01 11:39:31.377465863 +0100
          > ***************
          > *** 3250,3256 ****
          > the case of X). The font names given should be "normal" fonts. Vim
          > will try to find the related bold and italic fonts.
          >
          > ! For Win32, GTK, Mac OS and Photon: >
          > :set guifont=*
          > < will bring up a font requester, where you can pick the font you want.
          >
          > --- 3250,3256 ----
          > the case of X). The font names given should be "normal" fonts. Vim
          > will try to find the related bold and italic fonts.
          >
          > ! For Win32, GTK, Motif, Mac OS and Photon: >
          > :set guifont=*
          > < will bring up a font requester, where you can pick the font you want.
          >

          I'll change it, thanks.

          --
          From "know your smileys":
          O:-) Saint

          /// Bram Moolenaar -- Bram@... -- http://www.Moolenaar.net \\\
          /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
          \\\ download, build and distribute -- http://www.A-A-P.org ///
          \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
        Your message has been successfully submitted and would be delivered to recipients shortly.