Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 27 Jun 2007 12:39:37 -0700
From:      Neil Gruending <neil@gruending.net>
To:        Nikola Lecic <nlecic@EUnet.yu>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: gvim can't find a valid font
Message-ID:  <4682BCF9.3060002@gruending.net>
In-Reply-To: <200706271853.l5RIqt3f026674@smtpclu-5.eunet.yu>
References:  <4681FFD7.60104@gruending.net>	<200706271213.l5RCCvMn015478@smtpclu-1.eunet.yu>	<4682AA68.4070004@gruending.net> <200706271853.l5RIqt3f026674@smtpclu-5.eunet.yu>

next in thread | previous in thread | raw e-mail | index | archive | help


Nikola Lecic wrote:
> On Wed, 27 Jun 2007 11:20:24 -0700
> Neil Gruending <neil@gruending.net> wrote:
> 
>> Nikola Lecic wrote:
>>> On Tue, 26 Jun 2007 23:12:39 -0700
>>> Neil Gruending <neil@gruending.net> wrote:
>>>
>>>> Hi,
>>>>
>>>> I'm having a problem trying to get gvim 7.0.224 working. Every
>>>> time I try to start it I get the following error:
>>>>
>>>> E665: Cannot start GUI, no valid font found|16H|8H|4H|31H
>>>>
>>>> and I get the console vim instead. I think I've messed up my xorg
>>>> fonts somehow after upgrading to 7.2. I followed all of the steps
>>>> in /usr/ports/UPGRADING, but I didn't have the xorg metaport
>>>> installed so I installed it after upgrading. The first time I
>>>> started it there was an error message that said I needed to run a
>>>> program in the fonts directory (I forget which one), but I'm
>>>> pretty sure I didn't fix the module path before running the
>>>> command. I'm using the terminal in Xfce 4.4.1 to try and start
>>>> gvim.
>>>>
>>>> Here's part of my xorg.conf (now) in /etc/X11 that seems to be
>>>> related to fonts:
>>>> [...]
>>> Hello Neil,
>>>
>>> This is strange because gVim uses built-in X fonts (i.e. 7x13) if
>>> can't find anything else; and your X is running normally, which
>>> couldn't be without any font available. So:
>>>
>>> (1) 'xlsfonts' gives what?
>>>
>>> (2) Could you please send here a relevant part of ~/.gvimrc? (Also
>>>     try to start gVim without it.)
>>>
>>> (3) How did you compile gVim, with WITH_GTK2, or?
>>>
>>> It's certainly not related to your gVim problem, but as of your
>>> xorg.conf, do you have any special reason for commenting out RgbPath
>>> and Type1 FontPath?
>>>
>>> Nikola Lečić
>> Hi Nikola,
>>
>> xlsfonts gives:
>> [...]
> 
> Looks good, gVim's last choice (7x13) is there.
> 
>> and here's my vimrc (running without a vimrc doesn't change the
>> error):
>> [...]
> 
> Not ~/.vimrc, but ~/.gvimrc. However, I'd say this is window$ version,
> ('behave mswin' etc.). You should carefully rewrite this file.
> 
>> I compiled gvim from ports with the default options I think. I'm not 
>> sure how to get the options used for compiling after installing a
>> port.
> 
> You might want to recompile the port with gtk2 support, for example:
> 
>   # portupgrade -f -m 'WITH_GTK2=yes' vim
> 
> (BTW, your vim is 7.0.224, whilst the last version is 7.0.241 -- not a
> bad idea to upgrade your ports first and then to upgrade vim.)
> 
> There is gvimrc example, /usr/local/share/vim/vim70/gvimrc_example.vim.
> You can copy that file to ~/.gvimrc and edit it. Additionally, I
> attached the stripped version of my gVim config (gvimrc-nikola). You
> will see there several if clausules for default font setting since the
> syntax depends on how you compiled vim. In your case (with default
> options), gVim should read "x11" section.
> 
>> As for the RGBpath and Type1 font path, that's how xorg made the
>> file. Since I don't know much about configuring X, I figured it was
>> smarter than me and it knew what it was doing.
> 
> Ok. So,
> 
> (1) try to use gvimrc I sent (of course, check if you actually have
>     fonts that are listed there), or try the official example;
> 
> (2) try to upgrade vim, consider enabling gtk2 support (gVim will
>     behave as a full gtk2 app then)
> 
> (3) try to remove all old config files you have, including system-wide
>     ones. ':version' should show you where they are.
> 
> Nikola Lečić

I did the portupgrade to 7.1.12 and now it works with my vimrc too! 
Thanks for the help.

Neil



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4682BCF9.3060002>