Tuesday, June 20, 2006

Where'd my fonts go ?

(One more thing that might be wrong if you cannot use all fonts in gvim on Linux)

I've been happily vimming away for years, and enjoying the upgrade to vim 7.0 for weeks.

So they give me this new server to play with, and I head off to set it up my way. Well not exactly my way (others will be logging in), but close enough.

And naturally I set about installing vim 7 first.

Had to edit a few details to get things my way. In particular I wanted to make sure I had a python interperter within vim, so I
  1. Made sure I had Python installed from source
    • And after installing that I made sure to remove the Mandrake installation of Python
    • Why can't Mandrake use /usr/local like everyone else ?
    • I know about it by now so it didn't catch me again. But if you are new to this -
      • on Mandrake python lives (by default) at /usr/bin/python.
      • If you use a "python*mdk*rpm" to upgrade all is fine
      • But if you install Python from source then it will install to /usr/local/bin/python
      • And you may end up chasing your tail for hours wondering why your newly installed python is still the old version (because $PATH ensures the /usr/bin version is found first)
      • It is possible to install new python on top of the old one, but I prefer to install to /usr/local, then delete the old Mandrake installation. That makes it easier when dealing with other programs (e.g. vim) which want to find python.
  2. Made sure I had the required gtk libraries
  3. cd $VIM_DOWNLOAD_DIRECTORY
    1. edit src/Makefile
    2. Ensure the right GUI option is uncommented (around line 345)
    3. make distclean
    4. make
    5. make install
And all worked fine, except that gvim could not find my fonts. Having wasted hours on this and this and this (Aha! So that's how you handle fonts in KDE) and . . . I came back to the installation and combed the make output to find:
"checking for GTK - version >= 2.2.0... found version 1.2.3"

That's it - no "Sorry, we can't use the gui you want", no mad crash, no "are you sure you'd like us to revert to gtk for you", just carry on regardless.

And if Bram (or whoever) thinks that that "warning" stands out from all the guff that a "make" produces, then they really need a course in usability.

Anyway - if you can't get your correct fonts in gvim, you may need to recompile. But make sure you know that you have the correct (versions) of libraries installed first. Becuase vim will just change your mind for you if you don't.

OTOH - now that it's up again, I'll have to see about blogging thence, becuase (inter alia) it always corrects that "because" for me.

0 Comments:

Post a Comment

Links to this post:

Create a Link

<< Home