From: wjh+@ANDREW.CMU.EDU (Fred Hansen)
Newsgroups: comp.soft-sys.andrew
Subject: Re: fonts when server differs
Date: 2 Sep 92 20:02:28 GMT
Distribution: world
Organization: The Internet

There have lately been some discussions about setting the font path for
AUIS applications.  Currently xim.c does an XSetFontPath to include
.../andrew/X11Fonts (or some site specified value) as the last entry on
the fontpath.  This is bogus because it looks up the fontpath on the
client machine and then passes it to the server, which may be on an
entirely different file system.

There have been various suggestions for guessing what fontpath to tell
the server, but none seems foolproof.  There is the suggestion that some
program be run before starting the X server or before running an Andrew
application.  All of these require care on the server end and will make
Andrew look bad if this care is not taken.

My own pet solution is to reduce the problem by not using fonts for the
various special purposes they have been put.  Instead, any application
desiring special characters would build them in a bitmap file.  Then the
bit map would be loaded in the client and transferred to a pixmap in the
server from which the images would be drawn on the window.

There would still be a problem with files that utilize the symbola font,
but this would not affect every application as does icon12 and shape10.

At the moment, switching to bit/pixmaps is but one alternative and we
are not yet implementing anything; we are busy on other tasks.  Should
someone wish to offer code for this or another solution, we would be
delighted.

Fred Hansen

Excerpts from mail: 2-Sep-92 Re: fonts when server differs Bill
Janssen@parc.xerox. (2594+0)

> I pretty much agree with Zalman:

> Excerpts from direct: 1-Sep-92 Re: fonts when server differs Zalman
> Stern@mv.us.adobe (1765)

>> I'd suggest removing any font path  hacking from ATK and making a
>> program (shell script or otherwise)   that can be run to set up your
>> display. In fact, for some X terminal   situations I've used, its
>> impossible to fix anyway because they can   only access fonts in certain
>> system directories via TFTP. The best   solution is for the system
>> administrators to make sure all X servers   come up with the Andrew
>> fonts available. (I full well realize that   won't work for many sites.)

> We use a rather complicated system here.  Any ``package'' (such as GNU
> Emacs, CMU CL, Sabre-C, Andrew, etc.) is put in its own directory tree
> that has a top-level directory called (imaginatively :-) top.  top is
> mandated to have three files called README, enable, and disable.  enable
> is a script that can be sourced by csh or tcsh, and sets up one's path
> and other environment variables suitably for use of the package. 
> disable is a script that similarly cleans up the environment.  One of
> the things that gets set in the enable file is an environment variable
> called XFONTPATH.  The enable for Andrew, around here, puts the Andrew
> X11 fonts on your XFONTPATH (we keep the fonts for MIT X and Sun OW in
> the same directory).  The model is that you enable packages before
> starting X, but you could also check the DISPLAY env var, and set the
> font path explicitly if it is set.  Other packages do similar things
> with their X fonts.  Our system-wide script for starting X looks at
> XFONTPATH and makes sure that all directories specified there are on
> your font path.

> Works pretty well, but not perfectly.  And everyone has to agree on the
> conventions -- the top directory with the enable and disable files, the
> use of a common runx script for starting X.  Just for grins, here's a
> copy of our /andrew/top/enable file:

>     # enable file for /package/andrew

>     # Location of the add-dir-to-var program
>     set add_dir = "/package/package-support/bin/add-dir-to-var"

>     if ( $?ANDREWDIR ) then
>         source ${ANDREWDIR}/top/disable
>     endif

>     setenv ANDREWDIR /package/andrew-r5

>     eval `$add_dir PATH ${ANDREWDIR}/bin`
>     eval `$add_dir PATH ${ANDREWDIR}/local/bin`

>     eval `$add_dir LD_LIBRARY_PATH ${ANDREWDIR}/lib`

>     setenv CLASSPATH "${ANDREWDIR}/dlib/atk:${ANDREWDIR}/local/dlib/atk"

>     eval `$add_dir XFONTPATH ${ANDREWDIR}/X11fonts`
>     eval `$add_dir XFONTPATH ${ANDREWDIR}/local/X11fonts`

> This is really an issue about system configuration and support that goes
> far beyond just supporting Andrew and ATK.

Bill