Information about Fonts

	This can be broken down into two parts.  First, there's the fact that there is more than one sort of font.  The other is the way that the X Long Font Description encodes some information about the font in the name itself.

1.  The Different Sorts of Forts

	There are basically two sorts of fonts in the world: scalable (or 'stroked' or 'outline') and bitmapped.  Scalable fonts are stored as a set of curves describing a shape, and these curves can be drawn at any size.  Bitmapped fonts are stored as a set of pixels, and can be copied directly to the screen.  This makes them faster and (usually) smaller; however, you don't get good results if you try making them bigger or smaller.

	Bitmapped fonts on X Windows are stored as ".pcf" files.  You can identify them in the font list quite easily: they look like

	-adobe-times-medium-r-normal--14-140-75-75-p-73-iso8859-1

	The key part is "14-140-75-75".  The 14 refers to the size in points; the other numbers you can forget about.

	Entries for scalable fonts have the form

	-bitstream-courier-medium-o-normal--0-0-0-0-p-0-iso8859-1

	The important part is "0-0-0-0".

	Using this entry directly always produces a 12-point font, at least on my server.  You get different sizes by replacing the -0-0-0-0- with -[size]-0-0-0-0-, where 'size' is the point size you want.  

	Scalable fonts, as far as I know, are stored in three formats.  You can tell what format a font is in by the extension on its filename:

	pfb		PostScript Type 1 Binary Format
	pfa		PostScript Type 1 Ascii Format
	spd		Speedo font

	Speedo fonts are also used on Ataris.  TrueType fonts can't be used by the current XFree86.  However, if your X server supports them, they will work with TkFont (or rather, they *should* work)...  

---------------------------------------------------------------------

2.  The X Long Font Description

	The TkFont main window is mostly filled with a list of cryptic font names that look a little like
	
	-adobe-times-medium-r-normal--14-140-75-75-p-73-iso8859-1
	
	What do all these things mean?  Well, as you can see, this names have 14 sections, each separated by a dash.  Sections can be empty.  

	"adobe" is the company that makes the font.  It's called the 'foundry'.

	"times" is the name of the font.
	
	"medium" is the weight (i.e. darkness) of the font.
	
	"r" means `regular'.  Other values are `i' or `o' for `italic' or `oblique'

	"normal" refers to normal width, given the height.  Other values might be `condensed' or `expanded'

	The next value, which is blank in the example, can be used to encode miscellaneous information.  i.e.  `sans serif' or `roman'.

	"14" refers to the point size.
	
	"140" is another way of referring to the size.  I'm not sure how it's different from the preceding one.  If anyone knows, please let me know.

	"75" refers to the X-resolution that the font is defined for.  That is, on a display that has 75 dots per inch horizontally, it is supposed to come out it's actual size.  On a higher-resolution display, a 14-pt font will actually be smaller than 14pts, and on a lower-resolution display, it'll be larger.

	The next "75" means the same thing, only now it's talking about the Y-resolution.

	"p" means proportional.  Other values might be `m' for monospaced, or `c' for character cell.  I don't know what the difference between `m' and `c' are.

	"73" refers to the average width of the font.  I don't know what the units are.  

	"iso8859" means that the font contains the characters specified in the ISO 8859 standards document.  Other values refer to other standards.

	I am not sure what the `1' refers to.  Apparently it's known as the `encoding' of the font.  If anyone can explain, please email me.

	If you want to know, say, what fonts on your system have monospaced characters, an excellent way to find out is to use `xfontsel'.  Read the man page.
