[comp.windows.x] Using dxterm from a Sun

paco@sbcs.sunysb.edu (Francisco J Romero) (11/07/89)

When I try to open a dxterm or some other DEC-specific applications on
my Sun, the call fails with some strange message about loading fonts. It
even dumps core, depending on the particular application.  Can anybody
help.  I tried to open the DEC fancy calendar program people have been
talking about on my Sun screen, but it failed badly. Does anybody know why?

Paco Romero(graduate student)              paco@sbcs.sunysb.edu
Dept. of Computer Science,                 
SUNY at Stony Brook, NY 11794          
(516)632-7678  

klee@chico.pa.dec.com (Ken Lee) (11/07/89)

In article <3843@sbcs.sunysb.edu>, paco@sbcs.sunysb.edu (Francisco J
Romero) writes:
> When I try to open a dxterm or some other DEC-specific applications on
> my Sun, the call fails with some strange message about loading fonts.

Your Sun is probably missing some of the fonts the application seeks.
Try using the resource manager to change the font requests.  The
defaults should be in the application system app-defaults file and can
be changed through your personal app-defaults or .Xdefaults or
(sometimes) the "-fn" command line switch.

Ken Lee
DEC Western Software Laboratory, Palo Alto, Calif.
Internet: klee@decwrl.dec.com
uucp: uunet!decwrl!klee

rws@EXPO.LCS.MIT.EDU (Bob Scheifler) (11/07/89)

If you have R3, you can kludge around the lack of fonts with a set of
font aliases.  Here are some I have used:

-A-Terminal-A-A-A--10-180-A-A-A-A-A-A fixed
-A-Terminal-A-A-A-A-A-140-A-A-A-A-A-A fixed
-A-Terminal-Medium-R-Normal--10-140-A-A-C-A-ISO8859-1 fixed
-A-Menu-Medium-R-Normal--10-120-75-75-P-A-ISO8859-1 fixed
-A-Terminal-Medium-R-Narrow--A-140-A-A-C-A-ISO8859-1 fixed
-A-Terminal-Medium-R-Narrow--A-140-A-A-C-A-ISO8859-1 fixed

xscope is one way of tracking down what fonts are being opened.

tengi@deepthought.Princeton.EDU (Christopher Tengi) (11/07/89)

In article <2052@bacchus.dec.com> you write:
> In article <3843@sbcs.sunysb.edu>, paco@sbcs.sunysb.edu (Francisco J
> Romero) writes:
> > When I try to open a dxterm or some other DEC-specific applications on
> > my Sun, the call fails with some strange message about loading fonts.
> 
> Your Sun is probably missing some of the fonts the application seeks.
> Try using the resource manager to change the font requests.  The
> defaults should be in the application system app-defaults file and can
> be changed through your personal app-defaults or .Xdefaults or
> (sometimes) the "-fn" command line switch.
> 
> Ken Lee
> DEC Western Software Laboratory, Palo Alto, Calif.
> Internet: klee@decwrl.dec.com
> uucp: uunet!decwrl!klee

Ken,
    I just tried what you suggested for *every* font specified in the defaults
file for dxcalendar.  I changed them all to 8x13 (which I have on my RT) in
both my .Xdefaults file and in the server's resources database.  I still got:

X Protocol error detected by server: font or color name does not exist
  Failed request major op code 45 X_OpenFont
  Failed request minor op code 0 (if applicable)
  ResourceID 0x1000001 in failed request (if applicable)
  Serial number of failed request 14
  Current serial number in output stream 17

Adding the "-fn" option to the command line (both before and after the
resource changes) didn't help either.  Any other ideas???


					/Chris

==========----------==========---------+---------==========----------==========

	UUCP:	  ...princeton!tengi
	INTERNET: tengi@Princeton.EDU
	BITNET:	  TENGI@PUCC
	VOICEnet: 609-258-6799
	FAX:	  609-258-3943

kochhar@endor.harvard.edu (Sandeep Kochhar) (11/07/89)

In article <3843@sbcs.sunysb.edu> paco@sbgrad5.UUCP (Francisco J Romero) writes:
>When I try to open a dxterm or some other DEC-specific applications on
>my Sun, the call fails with some strange message about loading fonts. It
>even dumps core, depending on the particular application.  Can anybody
>help.  I tried to open the DEC fancy calendar program people have been
>talking about on my Sun screen, but it failed badly. Does anybody know why?
>

We too had this problem; the problem is that certain dec specific
fonts are non-existant on the standard mit distribution.  IMHO, a
well-written application should use some default font if a particular
font is missing; this is what the initial message from dxterm and
other dec applications says (e.g. 'so-and-so font missing, using
fixed...') -- however, the applications crash after that message,
suggesting that they continue to try to use the non-existant fonts.
(Maybe newer versions of decwindows fix this 'feature'.)

Anyway, the best solution would be for dec to supply bdf versions of
their fonts so we could build snf versions for the suns  (anyone 
listening?).  Meanwhile, this line in the file .DXterm works
for us:

DXterm*littleFontSetName:   -adobe-courier-medium-r-*--12-120-75-75-m-70-iso8859-1


Also, for some other applications, something similar to the following
would help:  (in .Xdefaults)

	*font: variable

Hope this helps.

Sandeep Kochhar
(617) 495-3988              mail: kochhar@harvard.harvard.edu
Harvard University                kochhar@harvard.csnet
33 Oxford st,                     kochhar@harvard.uucp
Cambridge, Ma 02138               kochhar@harvard.bitnet

mouse@LARRY.MCRCIM.MCGILL.EDU (der Mouse) (11/12/89)

>> When I try to open a dxterm or some other DEC-specific applications
>> on my Sun, the call fails with some strange message about loading
>> fonts.  It even dumps core, depending on the particular application.

> We too had this problem; the problem is that certain dec specific
> fonts are non-existant on the standard mit distribution.
> [...] (e.g. 'so-and-so font missing, using fixed...') -- however, the
> applications crash after that message, suggesting that they continue
> to try to use the non-existant fonts.

Not that it's directly related to DEC software, but this may be related
to something I discovered a while ago.

Using the server default font isn't quite as easy as it seems; I had
programs die similarly until I finally tracked it down.

The essence of the problem is this: you can use XQueryFont with a GC to
find information about the font of that GC; using this with the default
GC of a screen gives you info about the server default font for that
screen.  However, the fid element of the resulting XFontStruct is the
ID of the GC, not of the font, and in particular it can't be used to
set the font in XCreateGC or XChangeGC.  (You can get the server
default by creating a GC without specifying a font, or copying the font
from the default GC.)

This is unpleasant particularly because you generally don't notice
anything wrong on your development system; it's only when the
application gets out into the world and runs into servers that don't
have the font in question that the code gets used and its brokenness
becomes apparent.

					der Mouse

			old: mcgill-vision!mouse
			new: mouse@larry.mcrcim.mcgill.edu