[comp.windows.x] X font files - is there any method to the madness?

pugh@svax.cs.cornell.edu (William Pugh) (08/04/87)

We are attempting to set up a system which uses many different font
styles and sizes.  The X window system, unfortunately, does not support
concepts such as font families, sizes or styles.  All that is supported
is a directory containing files for different fonts.  Somebody
attempted to set up a naming convention, but it is nowhere documented
and has a number of holes in it.  Below I've listed what I've been able
to piece together, and some of the holes I've found.

    For most files, the following naming convention is used:

	[family][size][style][type].onx

	family - for example, "timrom" or "helv"

	size - the height of the character set - for example, "10" or "12"

	style -
		empty string - no modifications
		"b" - bold
		"i" - italic
		(what should be used for bold-italic? "bi" or "ib")

	type -
		empty string - proportional font
		"fx" - fixed width, width spacing
		"sx" - ?? fixed width, narrow spacing??
		"ssx" - ??fixed width, very narrow spacing??


	For example,  to specify 12 point times-roman bold with fixed
	width spacing, use "timrom12bfx.onx".

    We have found a couple of problems:

	In most of the large proportional fonts, a space is defined to have
	zero width, which makes the font unusuable.  Why???

	In most fonts, the stored value for the baseline is incorrect.  In 
	some fonts it is zero, in others it is measured from the top of the 
	character, in some it is measured from the bottom of the character, 
	and in others it does not seem to correspond to anything.  The X 
	manual says that the baseline is measured from the bottom of the 
	character.

	In the standard distribution, some of the fonts are named wrong.  In
	particular, helv10.onx contains a times-roman 12 point italic font,
	and there does not appear to be any correct helvetica 10 font.  

	There are a lot of holes in the supplied fonts.  I can understand
	this for some of the special purpose fonts, but why are there no 
	10 point italic helvetica fonts?


    The things I'm particularly looking for opinions and information on are:

	What does "sx" and "ssx" mean when it occurs in the font name?

	How should a bold-italic font be named?

	Why do some fonts have zero width spaces?

	Is anybody in charge of X fonts and attempting to see that a 
	consistent collection is put together, or are fonts files simply
	an uncoordinated collection of submissions?


Bill Pugh

jtkohl@ELRIC.mit.edu (John T Kohl) (08/04/87)

In article <1529@svax.cs.cornell.edu> pugh@svax.cs.cornell.edu (William Pugh) writes:
>
>	What does "sx" and "ssx" mean when it occurs in the font name?
>

This is from a (gross) hack done here at Project Athena during the semi-early
days of X (probably around Release 1 or 2), when some of the student
employees were playing with fonts.

'fx' means 'fixed width'
'sx' means 'scrunched fixed width'
'ssx' means 'super-scrunched fixed width'

'fx' fonts are just the variable width fonts made fixed width (with the
widest width being inherited by all the characters)

sx and ssx are versions of the variable-width fonts algorithmically
modified (by a program which may no longer exist) to fit in narrow and
narrower space, (with some pixels combined).

If you are interested in the program, Jim Aspnes (asp@athena.mit.edu)
(the author) may have it lying around somewhere.



----
John Kohl
MIT/Project Athena

RWS@ZERMATT.LCS.MIT.EDU (Robert Scheifler) (08/05/87)

    Why do some fonts have zero width spaces?

Because a space generally isn't useful for proportional fonts.
The problem you are really seeing is that most X clients out
there today only work with fixed-width fonts.

	    Is anybody in charge of X fonts and attempting to see that a 
	    consistent collection is put together, or are fonts files simply
	    an uncoordinated collection of submissions?

The V10 fonts are completely random.  Various groups are privately
acquiring their own sets of coordinated fonts for V11, but at this point
there are no sets with unrestricted distribution rights that MIT can use
on the release tape.  There are some people thinking about coherent font
naming; if anyone has suggestions along these lines, feel free to send
them to me.

pugh@cornell.UUCP (William Pugh) (08/11/87)

In article <870805102857.5.RWS@KILLINGTON.LCS.MIT.EDU> RWS@ZERMATT.LCS.MIT.EDU (Robert Scheifler) writes:
>
>    Why do some fonts have zero width spaces?
>
>Because a space generally isn't useful for proportional fonts.
>The problem you are really seeing is that most X clients out
>there today only work with fixed-width fonts.
>

I don't understand why you believe that spaces are not useful in
proportional fonts.  If I want to display a line of text in a proportional
font, I don't want zero width spaces.  It may be true that many X programs
are unable to handle proportional fonts.  However, the X implementation
of the Synthesizer Generator here at Cornell does handle proportional fonts
correctly, and we are now in the process of allowing mixed styles and sizes
within a single window and even on a single line.  To do this correctly,
we need to know how wide a space should be, and we need to know where
the baseline of each font is.


	Bill Pugh

P.S. - the Synthesizer Generator is a system that takes a formal 
	specification for a language-directed editor and produces
	an editor for the language.  The editor is specificied as
	a grammar for the language to be edited, attribute grammar
	rules to specify context sensitive information, and details
	relating to the parsing, display and transformations of edited
	programs.  The principles on the project are Thomas Reps
	and Tim Teitelbaum.
-- 
Bill Pugh
Cornell University
..{uw-beaver|vax135}!cornell!pugh
607-255-4934/257-6994