[comp.windows.x] Open Windows OLIT font problem fix

andrew@megadata.mega.oz.au (Andrew McRae) (08/22/90)

In <328@megadata.mega.oz.au> Andrew McRae (me) wrote:

>Having just obtained our copy of Open Windows 2.0, I decided
>to rebuild one of our applications using the OLIT (AT&T supplied
>Open Look widget set). As an experiment (and also because we had
>some different fonts) I decided to attempt to use this toolkit
>with the MIT R4 Xt intrinsics and Xlib and the MIT R4 server - after
>all, Sun says that it is all R4 compatible...

 .... description of font problem.

>I then created .snf files for all the OpenWindows fonts (using
>convertfont -x and bdftosnf), and added the font path and
>rehashed.

 ... problem doesn't go away.

After some investigation I found three problems. The first was my fault
in that the error about X_OpenFont was to do with a missing font I
thought I had. Once I resolved that, I received another message that
OLIT couldn't open the Scrollbar font. I tracked it down finally
to the convertfont utility, which was doing two things that conflicted
with OLIT.

The first thing that convertfont does (and I finally found it in the
small print) is it truncates filenames to 8 characters; given that the
extension (.bdf) is 4 characters, it seems arbitary that 8 is the default,
unless you assume that the .bdf file is going to be put under version
control. I seem to remember some consortium guidelines on this that
recommended leaving room for version control extensions, but this
seems strange to apply to a generated file. The filenames that
convertfont generates using 8 characters from the .fb files in
the Open Windows fonts are not unique when you convert them to .bdf
format, so when you (naively) run a script that converts all the fonts
you overwrite a large number in the destination directory.

Using the `-f' option you can expand the default filename size, so
this fixed the filename collision problem.

Convertfont also seems to append some kind of size extension to the
font name ("a12sbarh" -> "a12sbarh-12"), so the font that OLIT is
trying to load (without wildcarding) can't be found because of the
extension. The solution (easy, really) is to put aliases of the
fonts without the extension in the fonts.alias file.

Once I made this changes everything sprang into life, so the good
news is that Yes, Virginia, you CAN run the OLIT toolkit using
plain vanilla MIT R4 X/Xt..... now if I can only get
rid of those widget version mismatch warnings...

To help those poor souls who have experienced the same problem I have
appended the fonts.alias file; I am not sure if all the fonts
that are in there need to be, but it is easier that working out which
ones don't need to be in there.

Andrew McRae			inet:	andrew@megadata.mega.oz.au
Megadata Pty Ltd,		uucp:	..!uunet!megadata.mega.oz.au!andrew
North Ryde  2113		Phone:	+61 2 805 0899
NSW    AUSTRALIA		Fax:	+61 2 887 4847
---------------
sbarh		a12sbarh-12
sbarv		a12sbarv-12
sldrv		a12sldrv-12
sldrh		a12sldrh-12
button		a12butto-12
lucida		a12iluci-12
a12biluc	a12biluc-12
a12bluci	a12bluci-10
a12butto	a12butto-12
a12iluci	a12iluci-12
a12lucid	a12lucid-10
a12sbarh	a12sbarh-12
a12sbarv	a12sbarv-12
a12sldrh	a12sldrh-12
a12sldrv	a12sldrv-12
b12bluci	b12bluci-10
b12butto	b12butto-12
b12lucid	b12lucid-12
b12sbarh	b12sbarh-12
b12sbarv	b12sbarv-12
b12sldrh	b12sldrh-12
b12sldrv	b12sldrv-12
c12bluci	c12bluci-12
c12butto	c12butto-12
c12iluci	c12iluci-12
c12lucid	c12lucid-12
c12sbarh	c12sbarh-12
c12sbarv	c12sbarv-12
c12sldrh	c12sldrh-12
c12sldrv	c12sldrv-12
d12bluci	d12bluci-14
d12butto	d12butto-12
d12iluci	d12iluci-14
d12lucid	d12lucid-14
d12sbarh	d12sbarh-12
d12sbarv	d12sbarv-12
d12sldrh	d12sldrh-12
d12sldrv	d12sldrv-12
e12bluci	e12bluci-10
e12butto	e12butto-12
e12lucid	e12lucid-10
e12sbarh	e12sbarh-12
e12sbarv	e12sbarv-12
e12sldrh	e12sldrh-12
e12sldrv	e12sldrv-12
f12bluci	f12bluci-10
f12butto	f12butto-12
f12lucid	f12lucid-12
f12sbarh	f12sbarh-12
f12sbarv	f12sbarv-12
f12sldrh	f12sldrh-12
f12sldrv	f12sldrv-12
g12bluci	g12bluci-10
g12butto	g12butto-12
g12lucid	g12lucid-10
g12sbarh	g12sbarh-12
g12sbarv	g12sbarv-12
g12sldrh	g12sldrh-12
g12sldrv	g12sldrv-12
h12bluci	h12bluci-12
h12butto	h12butto-12
h12iluci	h12iluci-12
h12lucid	h12lucid-12
h12sbarh	h12sbarh-12
h12sbarv	h12sbarv-12
h12sldrh	h12sldrh-12
h12sldrv	h12sldrv-12