Subject: using X fonts

From: [email-masked] (john yates)
Date: Tue, 01 Apr 1997 20:03:50 -0500

Like so many of the ntemacs community I am interested in having
bold and italic versions of my basic font available under emacs.
As a starting point I thought that I ought to be able to use the
X windows raster fonts. There are a number of X servers available
for Windows and many convert the X distribution bdf raster fonts
to Windows .fon format. I downloaded a trial version of Distinct's
X server from http://www.distinct.com/download/index.htm .  While
activating the trial requires magic serial numbers that have to be
obtained from Distinct the unactivated installation already provides
all of the X fonts as .fon files.  Just what I was looking for!

I decided to concentrate on X Schumacher Clean since the 6x12 and
8x8 forms include both bold and italic versions.  An obvious problem
with the fonts is that the normal, bold and italic versions are
named

	Normal:	X Schumacher Clean #048
	Italic:	X Schumacher Clean #049
	Bold:	X Schumacher Clean #110

Using hexedit I changed these names as follows

	X Schumacher Clean #048	 ->  Schumacher Clean
	X Schumacher Clean #049  ->  Schumacher Clean Italic
	X Schumacher Clean #110  ->  Schumacher Clean Bold

Once installed I was able to get emacs to use each individually.
I did not even have to set win32-enable-italics to t.  Each font
appears to use an identically sized character cell as I saw no
increase in line space when using the italic font.

Unfortunately emacs does not seem to understand the relationship
of one font to another since when I establish Schumacher Clean as
the default font using both the -font command-line switch and
using set-default-font in my .emacs the bold and italic faces
continue to use the normal font.

What I did notice is that in the font dialog while the multiple
versions of Arial, Courier, etc are collapsed into a single font
name offering four styles my three Schumacher Clean fonts show up
as three distinct fonts.  I assume that this is because .fon files
have no PANOSE information.

Thus I am forced to conclude that if emacs is ever to use families
of X fonts it is going to have to implement some form of matching
heuristic.

Can anyone comment on how hard that would be?

[Just as an aside I should mention that the 6x12 italic font is
not the prettiest, being severely limited by the contraint of
fitting into the same character cell as normal and bold.  The
upper right corner of the glyphs is simply truncated.  Lowercase
letters are all fine but H, J, M, N, T, U, V, W, Y and to lesser
extents C, E, F, G, K, O, P, Q, R, S, X and Z all show truncated
pixels.]

/john