Path: utzoo!attcan!uunet!husc6!bloom-beacon!mit-eddie!killer!tness7!bellcore!dana
From: dana@dino.bellcore.com (Dana A. Chee)
Newsgroups: comp.windows.x
Subject: Re: strange thing from XLoadQueryFont
Message-ID: 
Date: 17 Aug 88 13:40:22 GMT
References: <1500@daisy.UUCP>
Sender: news@bellcore.bellcore.com
Organization: Bellcore, Morristown, NJ  USA
Lines: 47
In-reply-to: turner@daisy.UUCP's message of 16 Aug 88 21:46:39 GMT

In article <1500@daisy.UUCP> turner@daisy.UUCP (D'arc Angel) writes:

   I am running X11R2 on a sun 386i under SunOS 4.0, I have the game xconq 
   on an NFS mounted directory (a Sun 4). I set the path in .Xdefaults to
   be

   xconq.IconFont:		/misc/Xconq5/lib/xconq.snf

   (/misc is the NFS mounted directory) 

   and xconq says that it can not open the font. Hmmm says I, what about xfd ?
   same story. So I moved the fonts to /tmp, shazam it works for both xconq
   and xfd. Anyone have any ideas why XLoadQueryFont can't open an nfs file?
   The permissions were all correct (I believe that I have checked all of the
   obvious problems)

   -- 
   Can this wait until after I've had my coffee ???
   ...{decwrl|ucbvax}!imagen!atari!daisy!turner (James M. Turner)
   Daisy Systems, 700 E. Middlefield Rd, P.O. Box 7006, 
   Mountain View CA 94039-7006.                          (415)960-0123

Sure do.   The OS code for opening a font converts the font name to
lower case.  But it doesn't take into account that the entire path
shouldn't be converted.  So the file it tries to open is
/misc/xconq5/lib/xconq.snf  with the X of Xconq5 changed to x.  A fix
we used to get around the problem here is in
~X/server/os/4.2bsd/filenames.c function TryToExpandFontName().

    /*
     * reduce to lower case only
     */
    for ( in=lenfname-1; in>= 0 && lowername[in] != '/'; in--)
        if ( isupper( lowername[in]))
            lowername[in] = tolower( lowername[in]);

Hope this helps.


--
+*************************************************************************+
*  Dana Chee				(201) 829-4488			  *
*  Bellcore								  *
*  Room 2Q-250								  *
*  445 South Street			ARPA: dana@bellcore.com		  *
*  Morristown,  NJ  07960-1910		UUCP: {gateways}!bellcore!dana	  *
+*************************************************************************+