[comp.windows.x] Help on programming with OpenLook Widgets

weon@ALADDIN.SOLVIT.CO.KR (Taehwan Weon) (11/28/90)

Dear xperts,

I made a x application using OpenLook widgets.
The program worked well under OpenWindow on SPARCstation.
But when I tried to run it on a different machine such as Personal IRIS,
I met the following error:

	OPEN LOOK Toolkit Error in application "xxx":  Could not find 
	default OPEN LOOK button font:

For your info, I have installed the OpenLook fons onto my Personal IRIS.
And the same error occured on NCD X terminals.

Is there anyone who solved the problem ?
I made the following resouce file for OpenLook applications.

*TitleFont: -b&h-lucida-bold-r-normal-sans-*-120-*-*-*-*-*-*
*Use3D:True
*titleFont: -b&h-lucida-bold-r-normal-sans-*-120-*-*-*-*-*-*
*textFont: -b&h-lucida-medium-r-normal-sans-*-120-*-*-*-*-*-*
*buttonFont: -b&h-lucida-medium-r-normal-sans-*-120-*-*-*-*-*-*
*MenuButtonFont: -b&h-lucida-medium-r-normal-sans-*-120-*-*-*-*-*-*
*iconFont: -b&h-lucida-medium-r-normal-sans-*-120-*-*-*-*-*-*
*glyphFont: -sun-open look glyph-*-*-*-*-*-120-*-*-*-*-*-*
*cursorFont: -sun-open look cursor-*-*-*-*-*-120-*-*-*-*-*-*
*menu.popup.outlineButton:False
*menu.pinned.outlineButton:False

I guess that I missed a resource entry for button widget.

Any comments will be appreciated.

-- 
THW(Taehwan Weon)

-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

.			  ##'	   SOLVIT Inc.
#                         '	   Kisung B/D 4F, 784-6 Yeoksam-Dong Kangnam-Gu
##   .##. .###. ##  ## ## ## ####  Seoul, Korea
###  ## # ## ## ##  ## ## ##  ##       
#### '##. ## ## ##  ## ## ##  ##   TEL : 82-2-561-0361~3	
###  # ## ## ## ##   # #  ##  ##   FAX : 82-2-561-0364 
##   '##' '###' ##### #   ##  ##	
#                         ##  ##   E-main address : weon@solvit.co.kr
'
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

db@sunbim.be (Danny Backx) (11/30/90)

Taehwan Weon (weon@ALADDIN.SOLVIT.CO.KR) wrote :
> I met the following error:
> 
>         OPEN LOOK Toolkit Error in application "xxx":  Could not find
>         default OPEN LOOK button font:

What you don't have on any other X server than the Open Windows server, is
a number of fonts that seem to be hardcoded into the OLIT (Open Look Intrinsic
Toolkit - used to be called Xt+).

What you can do is copy the d12* files from your $OPENWIN/lib/fonts directory
into a temporary directory. Then you have to use convertfont (an Open Windows
utility) with option -x to convert the fonts to BDF. After that, you can use
the standard X11r4 utility bdftosnf to make SNF files. Then you should use
mkfontdir to build the fonts.dir file. I believe that somewhere in these steps,
you should be careful about two fonts getting into the same file. (I.e. one
of the utilities - I think convertfont - generates a file name clash).

After that, you better also make a fonts.alias file. To make this easy, here is
mine :

d12bluci		d12bluci-14
d12butto		d12butto-12
d12iluci		d12iluci-14
d12lucid		d12lucid-14
d12sbarh		d12sbarh-12
d12sbarv		d12sbarv-12
d12sldrh		d12sldrh-12
d12sldrv		d12sldrv-12

After that, use xset fp+ to get the directory into your X server's font path.
To check, you may want to do
	xlsfonts -fn "d12*"

If you still have trouble, remember that your NCD generates error messages,
including the ones about missing fonts, in its diagnostic session. In there,
you can see the exact font name that your application is trying to load.

You should be able to use the same method (maybe even the same directory ?)
for your Personal IRIS.

Oh yes, why the d12* files ? I don't really know. I believe OLIT determines the
exact font it needs from the dimensions of the X server it uses. So maybe your
systems require you to start with one of the other groups of font files.

	Danny Backx
	BIM Networks System Engineer

E-Mail: db@sunbim.be    (or uunet!mcsun!ub4b!sunbim!db)

Telephone: +32(2)759.59.25	Fax : +32(2)759.47.95

Postal Mail :
	Danny Backx
	BIM
	Kwikstraat 4
	3078 Everberg
	Belgium

aim@corp.sun.COM (Amy) (12/01/90)

>>From xpert-mailer@expo.lcs.mit.edu Fri Nov 30 04:51:41 1990
>>To: xpert@expo.lcs.mit.edu
>>Subject: Re: Help on programming with OpenLook Widgets
>>Cc: weon@aladdin.solvit.co.kr
>>
>>Taehwan Weon (weon@ALADDIN.SOLVIT.CO.KR) wrote :
>>> I met the following error:
>>> 
>>>         OPEN LOOK Toolkit Error in application "xxx":  Could not find
>>>         default OPEN LOOK button font:
>>
>>What you don't have on any other X server than the Open Windows server, is
>>a number of fonts that seem to be hardcoded into the OLIT (Open Look Intrinsic
>>Toolkit - used to be called Xt+).
>>
>>What you can do is copy the d12* files from your $OPENWIN/lib/fonts directory
>>into a temporary directory. Then you have to use convertfont (an Open Windows
>>utility) with option -x to convert the fonts to BDF. After that, you can use
>>the standard X11r4 utility bdftosnf to make SNF files. Then you should use
>>mkfontdir to build the fonts.dir file. I believe that somewhere in these steps,
>>you should be careful about two fonts getting into the same file. (I.e. one
>>of the utilities - I think convertfont - generates a file name clash).

I believe that USL has placed these OLIT fonts already in .bdf format
on Expo....(in case you don't want to deal with the converting steps)

The file is OLIT2fonts.tar (not compressed) on expo.lcs.mit.edu via 
anonymous ftp in the contrib directory.  It includes all the 12-point
lucida fonts along with the button, slider, and scrollbar fonts.  It's 
about 550K. 


Amy Moore
(aim@sun.com)