	Format of a glyph file
	----------------------

Purpose:
	These files are used to make two types of font files
	One type is used to download a Hayes JT FAX 9600, and
	the other type is used by text2fax to do text to FAX
	conversion.

File Names:
	glyph.18x16	
	glyph.18x32	
	glyph.12x16	
	glyph.12x32	

Structure:	(all byte ordering is Intel 386 style)
	See file glyph.h for file structure information

Symset Table:
	To convert one of these glyph files, which contain
	glyph representations for all known glyphs, a symbol set
	table is used to select 256 glyphs from the glyph file
	for output into the font file.  The table consists of
	256 decimal glyph numbers in the ordering needed for the
	font.  A glyph number of 0 means the glyph is blank.
	Two tables of standard symbol sets are provided:
		symset.PC-8	Standard PC-8 symbol set
		symset.PC-8DN	Danish/Norwegian symbol set

Glyph to JT FAX Conversion:
	glyph2font -j glyph.18x16 symset.pc8 jtfax.18x16
	glyph2font -j glyph.18x32 symset.pc8 jtfax.18x32
	glyph2font -j glyph.12x16 symset.pc8 jtfax.12x16
	glyph2font -j glyph.12x32 symset.pc8 jtfax.12x32

Glyph to text2fax Conversion:
	glyph2font -p glyph.18x16 symset.pc8 port.18x16
	glyph2font -p glyph.18x32 symset.pc8 port.18x32
	glyph2font -p glyph.12x16 symset.pc8 port.12x16
	glyph2font -p glyph.12x32 symset.pc8 port.12x32

To make all of the above files, type:
	makefonts PC-8
Or:
	makefonts PC-8DN

Glyph to X windows bitmap conversion:
	glyph2font -x glyph.18x16 dirname
	(writes files dirname/NNNN, where NNNN is glyph code)
	(can use X windows 'bitmap' program to edit glyphs)

X windows bitmap to Glyph conversion:
	xbm2glyph dirname/* glyph.18x16
	(used to reconstruct a new glyph file after editting)

Location:
	These files are stored in directory:
		/usr/spool/fax/font

NOTE:	The JT FAX 9600 currently ignores font downloads for
	the low resolution 80 character/line (18x16) font and
	uses the onboard ROM instead.

Glyph Codes:

32-255		Glyph codes are the same as the PC-8 symbol codes
1001		o/slash
1002		O/slash
1003		L dot
1004		l dot
1005		o tilda
1006		O tilda
1007		a tilda
1008		A tilda
1009		script l
1010		quote n
1011		superscript 3
1012		circle with rays
9000-9999	Reserved for customer use

Suggestions for making hebrew fonts
-----------------------------------

All of the tools needed to create and manipulate the fonts used
by DigiFAX are stored in directory /usr/spool/fax/fonts.  There
is also a README file in there:  

README         glyph.18x32    jtfax.12x16    makefonts      port.18x32
glyph.12x16    glyph.h        jtfax.12x32    port.12x16     symset.PC-8
glyph.12x32    glyph2font     jtfax.18x16    port.12x32     symset.PC-8DN
glyph.18x16    ibmpcps.fz8    jtfax.18x32    port.18x16     xbm2glyph

The "glyph.WxH" files store all known glyphs (character symbols).  There
can be any number of symbols in these files.  Associated with each
symbol is a glyph number.  By convention, the glyph numbers for the
symbols we supply are identical to the ones for the PC-8 character set.
We also have some glyphs in there with numbers from 1000 and up that
are for the PC-8DN character set.

In addition to the glyph files, there are two symbol set files
supplied, symset.*.  These files consist of 256 glyph numbers.
They select 256 glyphs from the glyph.* files.  You can only have
256 symbols in an 8-bit character set.  These symset files map
glyph numbers onto a particular symbol set encoding, such as PC-8.

A font file used by DigiFAX is named port.*.  These font files
are created by using the "glyph2font" program, a glyph.* file,
and a symset.* file.

Here's the suggested procedure to create a Hebrew font.  You
will need to have X-windows running in order to edit
the bitmaps.

1)	First, unpack the current contents of one of the glyph.*
	files.  For example, the high resolution 80 column font:

	glyph2font -x glyph.18x32 18x32

	This will create a directory called 18x32 and in that
	directory you will see a bunch of files named with
	numbers: 0032 to 0255 and 1000 to 1012.  These files
	each contain a single glyph in X Window bitmap format.
	The name of the file is the glyph number in our encoding
	scheme.

2)	I understand that there are 26 hebrew letters that are
	mapped onto the ASCII lowercase letters (97-122), and that
	some punctuation is different, such as the question mark
	(ASCII code 63).  What I suggest is that glyphs for
	each of these characters be created using the X Window
	bitmap editor.  These glyphs should be stored in files
	in the 18x32 directory with names 9097-9122 and 9063.
	The naming is arbitrary, but this convention makes it
	easy to see what ASCII codes they will replace.  Plus,
	by not storing them directly into files names 0097-0122,
	you will still have the english glyphs available should
	they be needed.  Remember that a symset.* file will be
	used to map the glyphs to their 8 bit symbol set position
	later.

	Let's say we are going to create the hebrew letter that
	will replace the english 'a'.  First, change directory
	into 18x32.  Then type (under X window):
		bitmap 9097 18x32
	You will get a bitmap editor session on your screen.
	Using the editor, fill in the symbol as needed.  Then
	press the write file button and quit.

	Repeat this procedure for glyphs 9098-9122 and 9063.
		bitmap 9098 18x32
		bitmap 9099 18x32
		etc.

3)	You now have a directory, 18x32, that contains our supplied
	glyphs, plus the glyphs you've created (9000 range numbers).

	You now must use the "xbm2glyph" program to convert these
	X window bitmap files back into our glyph.* file.  To do this,
	change directory back to the parent (/usr/spool/fax/fonts).
	Type in this command:

		xbm2glyph 18x32/* glyph.18x32

	(you might want to first save a copy of glyph.18x32 somewhere in
	case something goes wrong).  This command reconstructs a
	new glyph.18x32 file.

	When this command is finished, you can remove the 18x32 directory
	and the files in it, they won't be needed anymore.  You can
	always use "glyph2font -x ..." to extract the bitmaps if you
	need to modify them further.

4)	OK, you've got all the glyphs you need, now you need to
	map them onto the 256 positions of an 8-bit font.  Copy the
	PC-8 symbol set map to a new file:
		cp symset.PC-8 symset.PC-H
	Using a text editor, such as vi, edit the file symset.PC-H.
	Notice that there are 256 numbers in this file.  The ordinal
	position of the number corresponds to its position in an 8-bit
	character set.  The number itself calls out a glyph number to
	put at that position.

	Change the numbers in positions 97-122 (which are also numbers
	97-122) to the numbers 9097-9122.  Also change 63 to 9063
	and any others that are particular to hebrew.
	
	This completes the creation of the symbol set.  Write the
	file and exit the editor.

 5)	All that is left now is to create the port.* files that
	DigiFAX actually uses.  Run the command:

		glyph2font -p glyph.18x32 symset.PC-H port.18x32

 6)	You should now repeat steps 1-3 for the 18x16 (low res font)
	and 12x32 and 12x16  (hi and low res compressed fonts).
	Note that the low res fonts will appear squashed when using
	the X bitmap editor.  Remember that low res pixels are doubled
	vertically when FAXed.  Unfortunately, the X bitmap program
	doesn't allow you to ``see'' these non-square pixels as they
	will actually look when faxed.
