Tux

...making Linux just a little more fun!

fonts puzzle, and puzzling gmail page upon login from firefox

Benjamin A. Okopnik [ben at linuxgazette.net]
Thu, 31 Aug 2006 21:16:29 -0400

[I wrote this earlier, but it didn't go out then. Posting it anyway, despite Peter having solved it, since I figure it'll be useful to our readers.]

On Thu, Aug 31, 2006 at 11:23:23AM -0700, Peter Knaggs wrote:

[ skipping the GMail question ]

>  Another question: I've come across this after updating
>  Debian testing: I seem to be loosing fonts, or at least
>  the helvetica font I need for vncviewer and imagemagic:
> 
>  For example, "display image.jpg" gives me:
> 
> display: unable to load font
> `-*-helvetica-medium-r-normal--12-*-*-*-*-*-iso8859-1'.
> display: unable to load font
> `-*-helvetica-medium-r-normal--12-*-*-*-*-*-iso8859-1'.
> 
> 
>  And vncviewer gives me this:
> 
> $ vncviewer wherever:2
> VNC server supports protocol version 3.7 (viewer 3.3)
> Password:
> VNC authentication succeeded
> Desktop name "wherever:2 (myusername)"
> Connected to VNC server, using protocol version 3.3
> VNC server default format:
> 16 bits per pixel.
> Least significant byte first in each pixel.
> True colour: max red 31 green 63 blue 31, shift red 11 green 5 blue 0
> Warning: Cannot convert string
> "-*-helvetica-bold-r-*-*-16-*-*-*-*-*-*-*" to type FontStruct
> Warning: Unable to load any usable ISO8859 font
> Warning: Unable to load any usable ISO8859 font
> Warning: Missing charsets in String to FontSet conversion
> Warning: Unable to load any usable fontset
> Error: Aborting: no font found
> 
> 
>  I tried searching for explanations, and as far as
>  I can tell I've got all the font packages installed.

First, I'd suggest checking to see if you system agrees with you about that.

ben at Fenrir:~$ xlsfonts -fn "-*-helvetica-bold-r-*-*-16-*-*-*-*-*-*-*"
-adobe-helvetica-bold-r-normal--16-116-100-100-p-0-iso10646-1
-adobe-helvetica-bold-r-normal--16-116-100-100-p-0-iso10646-1
-adobe-helvetica-bold-r-normal--16-116-100-100-p-0-iso10646-1
-adobe-helvetica-bold-r-normal--16-116-100-100-p-0-iso10646-1
-adobe-helvetica-bold-r-normal--16-116-100-100-p-0-iso8859-1
-adobe-helvetica-bold-r-normal--16-116-100-100-p-0-iso8859-1
-adobe-helvetica-bold-r-normal--16-116-100-100-p-0-iso8859-1
-adobe-helvetica-bold-r-normal--16-116-100-100-p-0-iso8859-1
-cronyx-helvetica-bold-r-normal--16-116-100-100-p-0-koi8-r
ben at Fenrir:~$ xlsfonts -fn '-*-helvetica-medium-r-normal--12-*-*-*-*-*-iso8859-1'
-adobe-helvetica-medium-r-normal--12-120-75-75-p-67-iso8859-1
-adobe-helvetica-medium-r-normal--12-120-75-75-p-67-iso8859-1
-adobe-helvetica-medium-r-normal--12-87-100-100-p-0-iso8859-1
-adobe-helvetica-medium-r-normal--12-87-100-100-p-0-iso8859-1
-adobe-helvetica-medium-r-normal--12-87-100-100-p-0-iso8859-1
-adobe-helvetica-medium-r-normal--12-87-100-100-p-0-iso8859-1
Mine certainly recognizes those patterns, and can match them from the installed fonts (which is why, I suppose, I don't have that problem. :)

If yours can't - and I suspect that this is what you'll find - then you need to do a little investigative work to find out what's happening. First, you'll need to find out what X considers your font directories:

ben at Fenrir:~$ xset q|grep -i font
Font Path:
  /usr/share/fonts/X11/misc/,/usr/share/fonts/X11/100dpi/,/usr/share/fonts/X11/75dpi/,/usr/share/fonts/X11/cyrillic/,/usr/share/fonts/X11/TTF/epson/,/usr/share/fonts/X11/TTF/extra/,/usr/share/fonts/X11/TTF/freefont/,/usr/share/fonts/X11/TTF/openoffice/,/usr/share/fonts/X11/TTF/thryomanes/
Lots of goodies, but those first three are the ones we really care about - we can live without the others, but these are the base fonts for X. They may be in a different place in your list; the important bits that we're looking for are the 75dpi/100dpi/misc directories.

(If you don't get some similar output, you'll need to verify that your '/etc/X11/xorg.conf' or '/etc/X11/XF86Config-4', whichever one you use, contains at least those critical directories in the "Files" section, as 'FontPath "/usr/share/fonts/X11/misc/"', etc.)

Now that you know where your fonts live, you need to check your font listings in those directories. These are contained in per-directory files called 'fonts.dir'. Here we go (note that you'll need to use whatever your font directories were, since there are at least two possible options):

ben at Fenrir:~$ grep -h -- -helvetica /usr/share/fonts/X11/100dpi/fonts.dir|head -5
helvB08-ISO8859-1.pcf.gz -adobe-helvetica-bold-r-normal--11-80-100-100-p-60-iso8859-1
helvB08.pcf.gz -adobe-helvetica-bold-r-normal--11-80-100-100-p-60-iso10646-1
helvB10-ISO8859-1.pcf.gz -adobe-helvetica-bold-r-normal--14-100-100-100-p-82-iso8859-1
helvB10.pcf.gz -adobe-helvetica-bold-r-normal--14-100-100-100-p-82-iso10646-1
helvB12-ISO8859-1.pcf.gz -adobe-helvetica-bold-r-normal--17-120-100-100-p-92-iso8859-1
If you don't get something similar to the above results, 'cd' into each of those font directories in turn and verify that you have the appropriate font files there (you can do a quick check against 'dlocate xfonts-{75,100}dpi'). If you do, then run, as root, the 'mkfontdir' command which will rebuild your 'fonts.dir' (it never hurts to do this in case of doubt) and follow it up with 'xset fp rehash', which will reread the font databases in the path.

That pretty much covers troubleshooting X fonts from one end to the other. If this doesn't fix it, shoot your computer and bury it with a stake through its CPU. :)

* Ben Okopnik * Editor-in-Chief, Linux Gazette * http://LinuxGazette.NET *


Top    Back


Peter Knaggs [peter.knaggs at gmail.com]
Thu, 7 Sep 2006 18:43:01 -0700

On 8/31/06, Benjamin A. Okopnik <ben at linuxgazette.net> wrote:

> That pretty much covers troubleshooting X fonts from one end to the
> other. If this doesn't fix it, shoot your computer and bury it with a
> stake through its CPU. :)

Thanks, I really appreciate your taking the time to put together this guide to the mysteries of X fonts. It helped a lot to reassure me that my eyes weren't deceiving me over the last few days.

It seems Debian testing was just going through some font troubles, and right enough, today everything is back to normal again after another dist-upgrade and restarting X a second time. So I guess it was a bit like a spot of bad font-weather.

Hope things went well with the hurricane and you managed to find shelter for your boat.

Peter.


Top    Back


Thomas Adam [thomas.adam22 at gmail.com]
Fri, 8 Sep 2006 12:34:18 +0100

On 08/09/06, Peter Knaggs <peter.knaggs at gmail.com> wrote:

> On 8/31/06, Benjamin A. Okopnik <ben at linuxgazette.net> wrote:
> > That pretty much covers troubleshooting X fonts from one end to the
> > other. If this doesn't fix it, shoot your computer and bury it with a
> > stake through its CPU. :)
>
> Thanks, I really appreciate your taking the time to put together this guide
>  to the mysteries of X fonts. It helped a lot to reassure me that
> my eyes weren't deceiving me over the last few days.

Slightly amused that you weren't relocated here, so here it is:

http://linuxgazette.net/128/adam.html

-- Thomas Adam


Top    Back


Benjamin A. Okopnik [ben at linuxgazette.net]
Fri, 8 Sep 2006 12:47:07 -0400

On Fri, Sep 08, 2006 at 12:34:18PM +0100, Thomas Adam wrote:

> On 08/09/06, Peter Knaggs <peter.knaggs at gmail.com> wrote:
> > On 8/31/06, Benjamin A. Okopnik <ben at linuxgazette.net> wrote:
> > > That pretty much covers troubleshooting X fonts from one end to the
> > > other. If this doesn't fix it, shoot your computer and bury it with a
> > > stake through its CPU. :)
> >
> > Thanks, I really appreciate your taking the time to put together this guide
> >  to the mysteries of X fonts. It helped a lot to reassure me that
> > my eyes weren't deceiving me over the last few days.
> 
> Slightly amused that you weren't relocated here, so here it is:
> 
> http://linuxgazette.net/128/adam.html

That's because I'd mentioned it explicitly in a couple of my recent articles, Thomas. Your fame is assured. :)

* Ben Okopnik * Editor-in-Chief, Linux Gazette * http://LinuxGazette.NET *


Top    Back


Benjamin A. Okopnik [ben at linuxgazette.net]
Fri, 8 Sep 2006 14:26:43 -0400

On Thu, Sep 07, 2006 at 06:43:01PM -0700, Peter Knaggs wrote:

> On 8/31/06, Benjamin A. Okopnik <ben at linuxgazette.net> wrote:
> > That pretty much covers troubleshooting X fonts from one end to the
> > other. If this doesn't fix it, shoot your computer and bury it with a
> > stake through its CPU. :)
> 
> Thanks, I really appreciate your taking the time to put together this guide
>  to the mysteries of X fonts. It helped a lot to reassure me that
> my eyes weren't deceiving me over the last few days.
> 
> It seems Debian testing was just going through some font troubles,
> and right enough, today everything is back to normal again after another
> dist-upgrade and restarting X a second time.
> So I guess it was a bit like a spot of bad font-weather.

[laugh]

> Hope things went well with the hurricane and you managed to find
> shelter for your boat.

Oh, that one petered out - when it went over us, we didn't even get any wind. We did, however, put out a large new anchor and chain just in case. There's another storm, Florence, in the offing -

http://www.nhc.noaa.gov/refresh/graphics_at1+shtml/144631.shtml?5day?large

- but for the moment, the projected track is fairly innocuous.

* Ben Okopnik * Editor-in-Chief, Linux Gazette * http://LinuxGazette.NET *


Top    Back


Thomas Adam [thomas.adam22 at gmail.com]
Mon, 11 Sep 2006 08:48:53 +0100

On Fri, 8 Sep 2006 12:47:07 -0400 "Benjamin A. Okopnik" <ben at linuxgazette.net> wrote:

> On Fri, Sep 08, 2006 at 12:34:18PM +0100, Thomas Adam wrote:
> > On 08/09/06, Peter Knaggs <peter.knaggs at gmail.com> wrote:
> > > On 8/31/06, Benjamin A. Okopnik <ben at linuxgazette.net> wrote:
> > > > That pretty much covers troubleshooting X fonts from one end to
> > > > the other. If this doesn't fix it, shoot your computer and bury
> > > > it with a stake through its CPU. :)
> > >
> > > Thanks, I really appreciate your taking the time to put together
> > > this guide to the mysteries of X fonts. It helped a lot to
> > > reassure me that my eyes weren't deceiving me over the last few
> > > days.
> > 
> > Slightly amused that you weren't relocated here, so here it is:
> > 
> > http://linuxgazette.net/128/adam.html
> 
> That's because I'd mentioned it explicitly in a couple of my recent
> articles, Thomas. Your fame is assured. :)

Heh -- you think I actually read Linux Gazette? :)

-- Thomas Adam


Top    Back


Benjamin A. Okopnik [ben at linuxgazette.net]
Mon, 11 Sep 2006 08:56:43 -0400

On Mon, Sep 11, 2006 at 08:48:53AM +0100, Thomas Adam wrote:

> On Fri, 8 Sep 2006 "Benjamin A. Okopnik" <ben at linuxgazette.net> wrote:
> > On Fri, Sep 08, 2006 at 12:34:18PM +0100, Thomas Adam wrote:
> > > 
> > > Slightly amused that you weren't relocated here, so here it is:
> > > 
> > > http://linuxgazette.net/128/adam.html
> > 
> > That's because I'd mentioned it explicitly in a couple of my recent
> > articles, Thomas. Your fame is assured. :)
> 
> Heh -- you think I actually read Linux Gazette?  :)

What's important is that your adoring fans do.

Really, there's no point in reading any of it. Did you actually think that it's possible to understand all this Linux stuff? According to a Large Unnamed Company based in Redmond WA, it's just way too complex for the human mind, and only weird techno-freaks could ever get it. Who are you going to believe, some wild-eyed fringe radicals or a reputable company with billions of dollars? The choice is obvious. :)

* Ben Okopnik * Editor-in-Chief, Linux Gazette * http://LinuxGazette.NET *


Top    Back