home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Simtel MSDOS 1992 September
/
Simtel20_Sept92.cdr
/
msdos
/
laser
/
ctable.arc
/
CTABLE.DOC
< prev
next >
Wrap
Text File
|
1987-11-01
|
53KB
|
1,060 lines
Note: Print this docfile at 12 characters per inch.
PROGRAM CTABLE ShareWare Version 1.37
Character Width Table Generator for
Downloadable Soft Fonts
Copyright (C) 1987 by John R. Thompson
PROGRAM CTABLE : Character Width Table Generator for Soft Fonts
TABLE OF CONTENTS
CHAPTER 1 - INTRODUCTION
1-1. CTABLE INSTALLATION and HELP SCREEN
1-2. CHARACTERS SETS AND CTABLE CHARACTER FILTERING OPTIONS
1-3. VERBOSE COMMAND LINE OPTIONS
CHAPTER 2 - SOFT FONT PRIMER
2-1. DOWNLOADING SOFT FONTS AND PRINTER INITIALIZATION
2-2. FONT SPECIFICATION ESCAPE CODES
CHAPTER 3 - INTEGRATING SOFT FONTS INTO PC-WRITE
3-1. GENERATING A CHARACTER WIDTH TABLE
3-2. MODIFYING A FONT CONTROL LINE IN PR.DEF
3-3. MODIFY THE ED.DEF FILE
3-4. MIXING LASER JET+ RESIDENT/CARTRIDGE BASED FONTS WITH SOFT FONTS
3-5. SAMPLE .DEF FILES
3-6. HINTS ON USING PROPORTIONAL FONTS WITH PC-WRITE
CHAPTER 4 - INTEGRATING SOFT FONTS INTO XyWrite
CHAPTER 5 - INTEGRATING SOFT FONTS INTO MICROSOFT WORD
5-1. CONVERT .PRD FILE TO A TEXT FILE
5-2. MODIFICATION OF A .PRD FILES
5-3. ID NUMBERS EXPLAINED
5-4. ADDING MULTIPLE FONTS
5-5. COMPLETING INSTALLATION
CHAPTER 6 - LIMITATIONS OF PROGRAM CTABLE
CHAPTER 7 - FILES INCLUDED WITH THIS PACKAGE
CHAPTER 8 - COPYRIGHT/LICENSE/WARRANTY
CHAPTER 9 - DISCLAIMERS AND ACKNOWLEDGEMENTS
APPENDIX 1 - REVISION RECORD
APPENDIX 2 - FONT GENERATION SOFTWARE
CHAPTER 1 - INTRODUCTION
Program CTABLE is intended to aid Users of downloadable fonts
on the HP Laser Jet+(tm) and Series II printers. A downloadable font is
a disk file that contains character definitions for a particular
typeface. The downloadable font is copied into the Laser Jet's memory
and can then be used like any built in font until the Laser Jet's memory
is purged.
Two problems are encountered in trying to "train" your word
processor to use a downloadable font: 1) You need to generate an
appropriate Laser Jet escape sequence to activate the font and 2) many
soft fonts are proportional fonts which means that each character is a
different width. With a proportional font, your word processor needs a
"character width table" in order for it to know how to properly format
your text. Program CTABLE is intended to meet both of these needs.
CTABLE will extract character width information from a downloadable soft
font file and generate a text file containing the character width table
and the escape sequence used to select this font. This character width
table must then be incorporated into your word processor's printer
definition file to complete the configuration process.
Some makers of font generation software also sell separate text
formatting software to perform proper spacing of proportional fonts.
Using this approach, the process of formatting text is effectively taken
away from your favorite word processor. In addition, a new set of
formatting commands must be learned and embedded in your text file.
Because the formatting is no longer performed within your word
processor, the position of line breaks and page breaks will no longer
be obvious while you are editing your text.
The philosophy behind program CTABLE is that you are undoubtedly
quite happy with the ability of your word processor to format text.
Thus, you probably DO NOT want to be forced to learn how to use a
separate formatter just to be able to use proportional fonts. The
approach taken by program CTABLE is to totally integrate new fonts into
your current word processor's printer definition file. Once this
process is complete your word processor can format text with these fonts
as easily as any other built in font. No new commands need to be
learned and your word processor retains control over the formatting of
your text.
Currently, program CTABLE output is formatted for direct inclusion
in PC-Write(tm), XyWrite(tm) or Microsoft Word(tm) printer definition
files. Program CTABLE will in the future be expanded to support other
word processors based on the expressed interest of potential users.
Chapter 2 of this document contains general information relevant
to using downloadable fonts and is intended to be a soft font primer
of sorts. Consult the Laser Jet documentation and/or the documentation
that comes with your font generation software for details specific to
your situation. The rest of this document is divided into sections
with specific information on installing new fonts with a particular word
processor.
BENEFITS OF PROGRAM REGISTRATION
The ShareWare version of program CTABLE has two built in
limitations: it will only define character widths for characters 32-127
and will only work with font files <= 40K bytes in size. Registered
users receive an enhanced version with neither of these limitations.
This documentation describes the enhanced version. Except for the
limitations stated above the operation of the ShareWare version is
identical to the enhanced version.
1-1. CTABLE INSTALLATION and HELP SCREEN and COMMAND SYNTAX
To install CTABLE on your system, simply copy the file CTABLE.COM
into the subdirectory you will be using it in or inro a subdirectory in
the DOS PATH. The first time program CTABLE is run it will ask which
word processor you are using and will install itself for that word
processor. If you wish to install program CTABLE for a different word
processor at a later date simply type CTABLE /I.
The normal command syntax for running program CTABLE is:
CTABLE fontfile [optional parameters]
where "fontfile" is the name of the downloadable font you wish to
process. The fontfile is read and a character width table and font
selection escape string are written to a file with the same name as the
fontfile using a .TAB extension. All parameters are optional. Two
parameters (/D and /Z) are provided to give the user more control over
the character filtering, however, most users will should not need to use
the filtering options (exceptions discussed below). Other parameters,
verbose options (/V, /VS, and /VL), simply cause CTABLE to display more
information about the font file it is processing. Use of these optional
parameters is described in more detail in the remainder of this chapter.
One other parameter, the font name parameter (/F=name) is provided
to assign a name to the font. This parameter is described under the
sections dealing with each brand of word processor.
Executing CTABLE with no parameters or font file name will display a
help screen summarizing the available options.
1-2. CHARACTERS SETS AND CTABLE CHARACTER FILTERING OPTIONS
The ASCII character set defines 256 characters that are assigned
decimal values from 0 to 255. "Standard ASCII" refers to the alphabit
and other "normal" characters usually found on a standard typewriter
keyboard. The Standard ASCII characters have decimal values from 32 to
127. The characters with decimal values above 127 are usually referred
to as the "Extended character set" and usually define special symbols
(for example box drawing symbols). Many of the characters with values
below 32 have special meanings and are not normally printable characters
(for examples ASCII decimal 12 is a form feed, ASCII decimal 26 is an
end of file marker). Nevertheless, some fonts define printing
characters for some of the characters below 32.
CTABLE can handle fonts that define any character from 0-255. By
default, program CTABLE will filter non-printing characters. In other
words it will skip non-printing characters leaving them out of the
character width table. Currently, three font types are defined by
Hewlett Packard (7 Bit, 8 bit, and PC-8). The non-printing charaters
for these font types are as follows:
Font Type : Non-Printint Chars : Type of printer
7 Bit : 0-31, 128-255 : LJ+/500+ and Series II
8 Bit : 0-31, 128-159 : LJ+/500+ and Series II
PC-8 : 0, 7-15, 27 : Series II only
For XyWrite users, characters 26, 174, 175, and 255 are also filtered
as these have a special function in XyWrite.
Some special fonts can print "non-printing" characters using the
graphics mode of the Laser Jet. In this special case you may wish to
allow definitions of all characters. For this situation the optional /D
(disable filter) parameter is available. This option totally Disables
all character filtering and allows definition of character widths even
for non-printing characters.
One final filtering option is provided primarily for XyWrite users.
The /Z option filters only the end-of-file character, decimal 26
(control Z). Many word processors stop reading text at the first
contorl Z. Thus, a character width table containing a control Z appears
incomplete when loading into such a word processor. Try the /Z option
instead of /D if the character width table appears incomplete when
loaded into your editor.
1-3 VERBOSE COMMAND LINE OPTIONS
Use of the optional /V parameter causes CTABLE to display detailed
information about the font file it is processing. Should you run into
problems, the information provided by this option may be helpful.
Since the information provided by the /V option scrolls by rather
quickly, the verbose data is also set to the output file.
Two variations of the /V parameter may be used, /VS and /VL. The
/VS parameter (S for screen only) causes the verbose information to be
displayed on the screen only. The /VL (L for Look only) causes the
verbose information to be displayed without creating a .TAB output file.
/VL is useful for just looking at a font to see what it is.
CHAPTER 2 - SOFT FONT PRIMER
This chapter attempts to explain some fundamentals about downloading
font files and the escape codes needed to access those fonts.
2-1. DOWNLOADING SOFT FONTS AND PRINTER INITIALIZATION
To use a soft font you must first install it in the printer's memory
each time the printer is powered up. This involves sending an escape
sequence to the printer to tell it that what follows is a font file and
to assign the font an ID number. Then the font file is copied to the
printer where it is held in the printer's memory until it is turned
off. Usually, another escape sequence is sent to the printer
following the font file to define the font as permanent or temporary.
NOTE: Both permanent and temporary fonts remain in the Laser
Jet's memory until the printer is turned off or a reset escape
sequence is set to purge the fonts. The difference between
permanent and temporary fonts is that a command can be sent to
purge all temporary fonts without affecting permanent fonts. A
different command can be used to purge all fonts.
Commonly, a batch file is used to automate the downloading procedure.
An Example batch file for downloading a font is shown below.
echo on
echo <Esc>*c1D>prn
copy /b fontfile prn:
echo <Esc>*c5F>prn
In this document <Esc> represents the non-printable escape character
(ASCII decimal 27).
NOTE: Many text editors allow you to enter the escape character by
the following procedure: while holding the alt key down, press the
numbers 2 then 7 on the numeric keypad and finally release the alt
key; the <Esc> symbol will display as a left arrow on the screen.
The above example would download the soft font named "fontfile" with a
font ID number 1. To download more than one font simply Repeat lines
2, 3 and 4 in the above example and change the number in line 2 so
that each font is assigned a unique ID#. See the sample batch file
"DOWNLOAD.BAT" for an example that downloads several fonts.
Attempting to copy a font file to a non-existent printer will cause the
computer to hang. A simple way to tell if everything is working
properly is to watch the ready light on the Laser Jet printer. If this
light begins blinking when you execute your font download batch file
everything is O.K. This light normally blinks when the Laser Jet is
receiving data. If the computer has gone out to lunch and this light is
not blinking, something is wrong! Normally each font takes less than a
minute to load into the Laser Jet's memory.
Note that the above example batch file (and all examples in this
document) assumes that the Laser Jet has been installed as LPT1
(synonymous with "PRN"). Laser Jets may be purchased for hookup to
either serial (LPT) or parallel (COM) ports. The download batch file
may have to adjusted depending on your hardware configuration. I
normally use a Laser Jet hooked to a serial port and initialize it as
LPT1 by placing the following two commands in my AUTOEXEC.BAT file.
mode com1:9600,n,8,1,p
mode lpt1:=com1
The first command sets the communications parameters and the second
line tells the computer to refer to the printer as LPT1 or PRN.
2-2. FONT SPECIFICATION ESCAPE CODES
After downloading a font, that font is activated by sending an
escape code to the printer. Normally, your word processor handles this
but you need to configure your word processor for the new font by
entering the font specification escape command into your word
processor's printer definition file. Since program CTABLE will
determine the appropriate escape command for you, reading of this
section should be considered optional.
There are two types of escape commands that may be used to
activate the desired soft font. One uses the font ID number assigned
to a font during the download. The other is a complete font
specification command that refers to a font by its characteristics
(such as point size, character weight etc). Normally, using the entire
font specification escape string is the better of the two methods.
Therefore, program CTABLE generates the complete font specification
escape string.
The general form of the font specification escape command is presented
below:
<Esc>&l#O<Esc>(#X<Esc>(s#p#h#v#s#b#T
| || | | | | | |__ Typeface
1=Landscape \/ | | | | |__ Stroke weight (-7 to +7)
0=Portrait symbol | | | |__ Style (1=italic, 0=normal)
set | | |__ Height (point units)
| |__ Pitch (characters per inch)
|__ (0=fixed font, 1=proportional)
All # symbols in the above example represent numbers specifying values
for the designated attributes. The characters #X represent a digit and
a letter that designate the symbol set. For more information on Laser
Jet escape sequences consult the Hewlett Packard Laser Jet Technical
Reference.
2-3 FONT ID NUMBERS
The other method for activating a downloaded font is an escape
command using the font ID number that is assigned during the downloading
procedure. The font ID escape command takes the form:
<Esc>(#X
where # represents the ID number assigned during downloading. This
method has the advantage of being much shorter than the full font
specification and therefore reducing the size of a Laser Jet ready print
file (this is a significant consideration only if you save printer
ready files to disk. Most people print directly to the printer.) On
the other hand, to use the font ID numbers you must insure the font ID
number escape commands in your word processor's printer definition file
coincide with the font ID numbers in the batch file you use to download
these fonts. Because of this, it is recommended that you rely on the
full font specification method.
CHAPTER 3 - INTEGRATING SOFT FONTS INTO PC-WRITE
Installing a new soft font in PC-Write is essentially a two step
process. First you run CTABLE to generate the character width table and
include the table at the top of your printer definition file. Then you
modify a font control line to assign a font letter to the new font.
3-1. GENERATING A CHARACTER WIDTH TABLE
Run program CTABLE to generate a character width table for a new
soft font.
Syntax: CTABLE fontfile /F=x
Where fontfile is the filespec of a downloadable soft font file. If no
file name is provided a help screen is displayed. The optional /F=
parameter defines the reference character used in the PC-Write character
width table. Substitute the desired character for "x". If not specified
this defaults to "X".
The character width table is written to a file with the same name
as the font file but with a .TAB extension. If an already existing .TAB
file of that name exists it will be overwritten. Use the PC-Write
utility MENULAZ to create a printer definition file (PR.DEF)
appropriate for your laser printer/font cartridge combination (in case
you didn't know, you can also add new fonts by a plug in cartridge).
Now you should insert the .TAB file for your new soft font into the
PR.DEF near the top (before the font control lines: see next section).
When you are through modifying your PR.DEF file you should keep a copy
of it in a file with a different name since some of the PC-Write
utilities may overwrite PR.DEF.
Sample Character Width Table:
(Character widths of 10phelv.fon in 300 dpi units)
(Below is a sample string to use in a font definition line)
(You will need to change the "49" if more than one downloadable font is used.)
(See the CTABLE documentation section 2-2 for more information.)
(Definition Sequence = @E300i+27,40,49,88-R )
@E: 32=11, 33=13, 34=14, 35=32, 36=23, 37=35, 38=28, 39=10, 40=14, 41=14
@E: 42=21, 43=34, 44=11, 45=13, 46=11, 47=21, 48=23, 49=23, 50=23, 51=23
@E: 52=23, 53=23, 54=23, 55=23, 56=23, 57=23, 58=12, 59=12, 60=34, 61=34
@E: 62=34, 63=22, 64=41, 65=27, 66=27, 67=29, 68=29, 69=26, 70=24, 71=32
@E: 72=30, 73=11, 74=21, 75=26, 76=22, 77=35, 78=30, 79=32, 80=26, 81=32
@E: 82=27, 83=27, 84=23, 85=29, 86=25, 87=37, 88=25, 89=25, 90=25, 91=15
@E: 92=21, 93=15, 94=23, 95=23, 96=10, 97=22, 98=25, 99=22, 100=25, 101=23
@E: 102=11, 103=25, 104=24, 105= 9, 106=10, 107=21, 108= 9, 109=36, 110=24, 111=24
@E: 112=25, 113=25, 114=14, 115=20, 116=12, 117=24, 118=20, 119=30, 120=20, 121=21
@E: 122=20, 123=23, 124=23, 125=23, 126=34
3-2. MODIFYING A FONT CONTROL LINE IN PR.DEF
In order to access the new font you need to assign a font letter to
it by modifying one of the font control lines in your printer control
file (PR.DEF). Usually, it is best to chose a font letter not
currently in use to avoid inactivating other already existing fonts.
The font control line you chose should be modified to define the escape
sequence that will tell the Laser Jet to use the new font. The
general form for this escape sequence is described in section 2-2,
however, you will only need to copy the sequence created by program
CTABLE and included just above the character width table in a comment
line surrounded by parentheses.
Sample Font Control Line:
#E=03 @E300i+27,040,049,088-R
In the Font control line the letters "@E300i" tell PC-Write that the
widths used in the @E character width table are 300ths of an inch
units. All tables created by CTABLE are in 300ths of an inch units.
The numbers following the @E300i are the decimal values of characters
corresponding to the font selection escape sequence. In this example
the shorter font ID number escape sequence is used simply because the
longer font specification escape sequence won't fit on the page.
Program CTABLE generates the font specification type of escape sequence.
3-3. MODIFY THE ED.DEF FILE
Normally the PC-Write editor does not read the printer definition
file. However, if you are using proportional fonts you need to tell
the editor to read the character width table in your printer definition
file. You do this by adding the following line to the BOTTOM of your
ED.DEF file:
!pr.def
After completing the above steps, you may use the new font in the
above example by specifying the font control letter in a .R:E command
or as an ALT E key combination just as you would normally do for other
fonts.
3-4. MIXING LASER JET RESIDENT/CARTRIDGE BASED FONTS WITH SOFT FONTS
If you plan to mix the use of soft fonts and fonts that are
resident in the Laser Jet or a Laser Jet font cartridge, you may have
to modify font control lines in your PR.DEF file that specify the
resident or cartridge based fonts. This is because the font control
lines in PR.DEF files created by the PC-Write utility program MENULAZ do
not necessarily specify ALL of the attributes of a particular font as
described in section 2-2. After you add font control lines for your
downloadable fonts, you should try printing a test file with your new
PR.DEF file first. If you have problems accessing the resident Laser
Jet fonts then you will have to expand the font selection sequences for
the cartridge based fonts to specify all of their attributes. You
should follow the example in section 2-2 above, referring to the Laser
Jet documentation for your font cartridge. The distribution file
CTABLE.ARC contains a sample PR.DEF file in which the font control
lines for resident fonts have been expanded already.
3-5. SAMPLE .DEF FILES
For your convenience, I have included a PC-Write .DEF file,
LASER.DEF, that has already been modified as described in section 3-4.
This file assumes you will be downloading 5 fonts: normal, bold, italic,
compressed and large fonts. Font control lines for fonts letters E, B,
I, C, and D are left blank for you to include the font specifications
for your fonts. LASER.DEF is suitable for the Laser Jet+ with no
cartridge installed. If you wish to mix cartridge fonts with downloaded
fonts see the discussion in section 3-4.
This sample .DEF file was modified from the PR.DEF file created by
the PC-Write utility program MENULAZ. Comments in this .DEF file are
enclosed in parentheses so you may view the file to see what fonts
are assigned to what font letter. If you wish to use this file
simply insert the character width tables for your fonts at the top of
the .DEF file (see section 3-1). Each width table should use the
reference character corresponding to its font letter (i.e. width table
lines for font E will begin with @E:. Note that this in not strictly
required but does avoid confusion). Then move the escape sequence for
each font onto the appropriate font control line. Finally, copy the
modified .DEF file into PR.DEF to complete the installation.
3-6. HINTS ON USING PROPORTIONAL FONTS WITH PC-WRITE
If you have not used proportional fonts before you will probably
have to get used to a few peculiarities.
Proportional fonts print different width characters, however characters
on the screen are fixed width. Therefore, when formatting proportional
fonts, the lines on the screen will appear to not line up with the
specified margins. They will, however, line up properly when printed.
You will probably need to make more frequent use of imbedded ruler lines
when using proportional fonts. The key sequence F2 F4 F2 inserts a
ruler line. You should place a ruler line at the top of every file.
The Ruler line units are in tenths of inches, thus a right margin in
column 70 will give a 7 inch line when printed.
I routinely use a 10 point font (there are 72 points per inch, the
number refers to character height). With a proportional 10 point font
you can fit more than 80 characters per line. Therefore, when typing,
the lines will go beyond the left edge of the screen. For convenience,
you can leave the .R: command out of the file while typing. Doing this
will make the right margin stay on the screen. Then, before printing,
add the .R: command at the top of the file and reformat the entire file
(ctrl-F5 F7 F5 key sequence).
Centering text requires that a special ruler line be placed just above
the text to be centered. In this ruler line, mark the right margin
position with C (for center text) in place of the R or J normally used
for the right margin. Now the text will center properly when printed.
Be sure to place a normal ruler line (R for right margin) below the
centered text or all subsequent text will be centered also.
If you have problems formatting or printing proportional fonts, double
check that the following steps have been followed.
1) A properly configured .DEF file has been copied into PR.DEF and
contains the character width tables.
2) The ED.DEF file contains the line:
!PR.DEF
near the bottom of the file to tell the editor to look in the
pr.def file for the character width tables.
3) A .R: command specifying the correct font has been inserted in
your document.
CHAPTER 4 - INTEGRATING SOFT FONTS INTO XyWrite
Run program CTABLE to generate a character width table for a new
soft font.
Syntax: CTABLE fontfile /F=fontname
Where "fontfile" is the filespec of a downloadable soft font file. If
no file name is provided a help screen is displayed. The optional /F=
parameter defines the reference name used to identify the new font. If
left out the font name defaults to "[FONTNAME]" and can be changed later
using your editor. The character width table is written to a file with
the same name as the font file but with a .TAB extension. If an already
existing .TAB file of that name exists it will be overwritten.
You will need to edit the .TAB file and modify certain lines to suit
your specifications, however, the hard work of generating character
width information and font selection escape sequence is done for you by
program CTABLE. Items that should be modified are surrounded by square
brackets. An Example fragment from a .TAB file formatted for XyWrite
appears below:
FO:[FONTNAME]
FO<[ESCAPE STRING]
VL=[VERTICAL LINE SPACING]
UW:[FONTNAME]
ET
WD:[FONTNAME]
SW=11
$=23
%=35
G=32
H=30
ET
In the above example:
[FONTNAME] must be replaced by the name you decide to use for this font.
Note that you may use the command line parameter /F=fontname to have
CTABLE substitute a user supplied font name. For example, the command
CTABLE FONTFILE /F=HELVETICA
would substitute HELVETICA as the fontname in the table listed above.
[ESCAPE STRING] is replaced by program CTABLE with an appropriate Laser
Jet escape string to activate this font.
[VERTICAL LINE SPACING] is replaced by a value to set the default line
spacing for this font.
The second group of lines in the above example (between WD:[fontname]
and ET) constitute the actual character width table and will contain one
specification line for each character in the font. The line SW=
specifies the default width used for any character not explicitly
defined in the table.
The .TAB file created by program CTABLE should be modified as needed and
incorporated into your XyWrite printer definition file (.PRN) in
accordance with instructions in the XyWrite documentation.
CHAPTER 5. INTEGRATING SOFT FONTS INTO MICROSOFT WORD
Microsoft Word printer definition files are binary files with a
.PRD extension. To modify or create a .PRD file you need the MS Word
utility program MAKEPRD. MAKEPRD converts a .PRD binary file into a
text file that can be edited and then converted back into a .PRD file
again by program MAKEPRD. Use of the MAKEPRD program and the structure
of printer definition files are described in detail in chapter 4 of the
"Printer Information" booklet supplied with the MS Word program. Below
I will describe how to modify the TEXT version of a .PRD file to
incorporate a new downloadable font.
5-1. CONVERT .PRD FILE TO A TEXT FILE
First you need to select a .PRD file from the Word Printer or
Utilities disk that best matches your printer/font cartridge
combination. Make a copy of this .PRD file giving it a new name. This
will avoid accidental destruction of the original .PRD file. Now
convert the .PRD file to a text file using the Word MAKEPRD facility by
typing:
MAKEPRD /T anyname.PRD anyname.tex
This command creates the text version of "anyname.prd" and puts it in
the text file named "anyname.tex". Anyname.tex is the file you will
actually edit. Below, when I refer to making modifications to the .PRD
file, it is the text version of this file I will be referring to. All
changes are made to the text version which is ultimately converted back
into a .PRD binary file.
Note that the text file produced by MAKEPRD and the .TAB file
produced by CTABLE are standard ASCII files, NOT MS WORD document
files. Use the WORD "transfer load" option to load these files for
editing. Also, select "no" in the "formatted field" in the
"transfer save" command when finished editing.
5-2. MODIFICATION OF A .PRD FILES
Word .PRD files have 5 parts: a header, font descriptions,
character width tables, character translation tables, and printer
control sequence descriptions. These occur in the order listed.
Generally, to install a new font you must add a font description and a
character width table. Program CTABLE reads a downloadable font file
and produces a .TAB file that contains a font description and character
width table. Run program CTABLE with the command:
CTABLE fontfile /F=fontname /N=fontnumber
where fontfile is the name of the downloadable fontfile you wish to
install. If the optional /F and /N parameters are omitted you will be
prompted for this information. The .TAB file produced will have the
same proper name as the font file with a .TAB extension.
A sample .TAB is shown below:
(Font Description Section)
{F0
CTP:NIL
cPSDs:1
Fontsize:20
Wtps:W0 W0 W0 W0
beginmod:1 "^[&l0O^[(0U^[(s1p11h10v0s0b4T"
endmod:0 ""
beginItalicmod:0
endItalicmod:0
beginBoldmod:0
endBoldmod:0
beginItalBoldmod:0
endItalBoldmod:0
DLF:1
FontName:helvetica
}F
(Character Width Table Section)
{W0
FontSize:20 chFirst:32 chLast:126
32:11 33:13 34:14 35:32 36:23 37:35 38:28 39:10 40:14 41:14
42:21 43:34 44:11 45:13 46:11 47:21 48:23 49:23 50:23 51:23
52:23 53:23 54:23 55:23 56:23 57:23 58:12 59:12 60:34 61:34
62:34 63:22 64:41 65:27 66:27 67:29 68:29 69:26 70:24 71:32
72:30 73:11 74:21 75:26 76:22 77:35 78:30 79:32 80:26 81:32
82:27 83:27 84:23 85:29 86:25 87:37 88:25 89:25 90:25 91:15
92:21 93:15 94:23 95:23 96:10 97:22 98:25 99:22 100:25 101:23
102:11 103:25 104:24 105:9 106:10 107:21 108:9 109:36 110:24 111:24
112:25 113:25 114:14 115:20 116:12 117:24 118:20 119:30 120:20 121:21
122:20 123:23 124:23 125:23 126:34
}W
To complete installation of the font, the font description and
character width table in the .TAB file must be divided and incorporated
into the appropriate location in the .PRD file in order to function
properly. Place the font description for your new font into the section
containing other font descriptions. Similarly, add the character width
table near other width tables (immediately after the last font
description if no other character width tables are present).
After placing the new font description and character width table in
the correct locations you need to modify the "header" section to tell
Word that downloadable fonts are to be used. Simply change the value of
"downloadflag" in the header to 1.
5-3. ID NUMBERS EXPLAINED
Each font description is given a name and a number. You should
chose a name and number not currently used in the .PRD file you are
modifying. Similarly, each character width table has an ID number.
Although program CTABLE assigns the same ID number to both the font
description and the character width table, this is not strictly
necessary. In some situations the character width table will require a
different number (see next section). Within the font description
section, the line "Wtps:" provides the ID number of the character width
table associated with this font. All that is required is that the
correct character width ID number appears on this line.
You must insure that a new font has a unique ID number assignment and
name. Also, insure that the character width table has a unique number.
5-4. ADDING MULTIPLE FONTS
If you plan to define several sizes of the same font style, all of
the font descriptions should be combined under one font name and ID
number. This requires some additional editing. For each different size
font, repeat the block of lines from the "fontsize:" to "DLF:". Place
the font descriptions in ascending size order, smallest first. (See the
example .PRD file in the MS Word "Printer Information" booklet). You
also need to modify the "cPSDs:" line (line number three of the font
description) to reflect the number of different size fonts being added.
In this situation several different size fonts share a common ID
number. However, each font still needs a unique character width table.
It is up to you to insure that each character width table has a unique
number that is properly referenced in the font description ("Wpts:"
lines).
5-5. COMPLETING INSTALLATION
After modifying the text version of the .PRD file it must be
converted back into a binary .PRD file by the MAKEPRD program. Simply
type:
MAKEPRD /P anyname.PRD anyname.tex where anyname.tex is the name of
the text version that has been modified and anyname.prd is the name for
the binary .PRD file. This command takes the text file anyname.tex and
converts it into the binary file anyname.prd.
Finally, go through the normal MS Word procedure for installing a
new printer and select your new .PRD file to complete the installation.
CHAPTER 6. LIMITATIONS OF PROGRAM CTABLE
Program CTABLE was written for and tested on downloadable font files
generated by GLYPHIX Font Generation Software (SWFTE International,
Ltd). However, considerable effort has been made to make program CTABLE
capable of reading font files from any source. No one has yet reported
that CTABLE failed to read a font file from another source.
The ShareWare version of Program CTABLE is limited in two ways. Only
fonts files <= 40K will be read and only character widths for characters
32-127 (decimal) are printed. These limits will allow you to configure
the normal ASCII character set for normal size fonts in order to see how
well the program works. Registered users will receive an enhanced
version that will handle larger fonts (currently 62K; soon to be
increased) and will handle extended character sets.
CHAPTER 7 - FILES INCLUDED WITH THIS PACKAGE
CTABLE.COM The character width table generator
LASER.DEF PC-Write Printer definition file (see section 3-5)
INITIAL.BAT Mode command example batch file for initializing a
Laser Jet hooked to COM1 as LPT1 (see section 2-1).
DOWNLOAD.BAT Example batch file to Download 5 font files from the
default drive and install them with font ID numbers
1-5. Change the font file names in this file to suit
your own purposes.
RESET.BAT Batch File to Purge all soft fonts and reset the
Laser Jet.
Note: all batch files are written assuming your
Laser Jet is initialized as LPT1. They will need to
be modified for other hardware configurations.
CTABLE.DOC This Documentation File.
CHAPTER 8 - COPYRIGHT/LICENSE/WARRANTY
This program is marketed under the ShareWare concept. As of
October 87, I know of no utility, commercial or otherwise, that provides
for the complete integration of soft fonts into XyWrite or PC-Write the
way CTABLE does. SoftCraft Inc. sells a utility to modify MS Word
printer definition files but charges 7.5X more than I charge for CTABLE.
If you use CTABLE please remember that you benefit from it each
each time you use your word processor and reward its developer by paying
the modest registration fee.
This document and the associated files listed above are copyrighted by
the author. The copyright owner hereby licenses you to:
Test the software;
Make as many copies of the program and documentation as you wish;
Give such copies to anyone;
Distribute the software and documentation via electronic means.
There is no charge for any of the above.
Restrictions:
The program shall be supplied in its original, unmodified form,
which includes this documentation.
No fee is charged. An exception is granted to not-for-profit user's
groups, which are authorized to charge a small fee (not to exceed
$7) for materials, handling, postage, and general overhead.
For-profit use without a license is prohibited;
The program may not be included - or bundled - with other goods or
services. Exceptions may be granted upon written request only.
There is no warranty of any kind, and the copyright owner is not
liable for damages of any kind. By using this software, you agree
to this.
The Enhanced version of CTABLE, sent to regeistered users is NOT
ShareWare and is NOT licensed for redistribution. Only the ShareWare
version distributed in archive format as CTABLE.ARC may be copied and
redistributed subject to the above terms.
The software and documentation are:
Copyright (C) 1987 by:
John R. Thompson
3415 Beechwood Blvd.
Pittsburgh, PA 15217
412-521-7672 6-11pm Eastern time
74017,2463 Compuserve ID
If you decide to use Program CTABLE you are obligated to pay the modest
registration fee of $20. You will then receive the enhanced version
that handles larger font files and extended character sets. If you
would also like to be notified of future releases of program CTABLE,
receive two free updates and/or would like technical support in using
the program, pay $35 instead. By technical support I mean I will try to
the limit of my ability to help you get fonts up and running. My
expertise is best for the word processor I personally use, PC-Write. If
you can provide me with the correct escape sequences for your font
cartridge and soft fonts, I will create a PC-Write .DEF file for you.
======================================================================
CTABLE REGISTRATION FORM
Send a check or money order payable to John R. Thompson (address above)
[ ] $20 Registration Fee
[ ] $15 Free Update/Technical Support
_____ Total Enclosed
_________________________ Signature
What Word Processor do you use? _________________________________
Which Font Generation Software do you Use? ______________________
=====================================================================
CHAPTER 9 - DISCLAIMERS AND ACKNOWLEDGEMENTS
LASER JET+ is a trademark of Hewlett Packard.
PC-Write is a trademark of Quicksoft.
XyWrite is a trademark of XyQuest Inc.
Word is a trademark of Microsoft.
GLYPHIX is a trademark of SWFTE International, Ltd.
I have no affiliation with any of the above named companies except as a
satisfied user of PC-Write, GLYPHIX, and the HP Laser Jet+.
I owe thanks to Edward Mendelson for the technical information needed
to configure CTABLE for use with XyWrite and to Craig Stark for numerous
valuable suggestions and for truly torture testing the program.
The installation procedure is derived from a public domain program
CONFIG.PAS v1.0 written by Randy Forgaard (CompuServe 70307,521).
APPENDIX 1 - CTABLE ERROR MESSAGES
Error messages report problems encountered with the font file. In most
cases CTABLE trys to complete its job but the Laser Jet may not accept
the font. "Caution" messages are issued as a warning when features
supported by the Series II printers but NOT the Laser Jet+/500+ printers
are encountered.
ERROR: Symbol Set Type NOT Recognized.
Font Selection Escape Sequence Will Probably Be INVALID.
The character table will still be correct.
CAUTION: Horizontal Motion Index exceeds Laser Jet+/500+ maximum of 315 dots.
ERROR: Horizontal Motion Index exceeds HP LJ Series II maximum of 4200 dots.
The font file specifies a font larger than the Laser Jet will allow.
CAUTION: Point Size exceeds maximum of 36 for the Laser Jet+
ERROR: Point Size exceeds HP LJ Series II maximum of 655
The font file specifies a font larger than the Laser Jet will allow.
ERROR: stroke weight is outside allowed range of -7 to +7
The stroke weight was larger or smaller than allowed and was reset
to either -7 or +7. The font file should still function.
CAUTION: This font will not be accepted by Laser Jet+/500+ series printers.
This message is issued when a PC-8 font type is encountered which
is acceptable only to Series II printers.
ERROR: One or more characters is wider than the maximum of 255 (300 dpi units).
Characters larger than allowed are ignored by the Laser Jet.
ERROR: Illegal Font Type Invalidates Soft Font File!
Illegal value for Font Type specified in the font descriptor.
The font file is invalid and will not be accepted by the Laser Jet.
ERROR: Font file too large, Table file may be incomplete
The font file is larger than CTABLE can handle.
The font selection escape sequence will be produced, but the
character width table will be incomplete.
ERROR: symbol set value out of range.
The font descriptor contains a value larger than allowed for
specifying the symbol set. The font file is invalid and will not
be accepted by the Laser Jet. A character width table will still
be produced.
ERROR: Bad font orientation invalidates soft font.
Indicates that the font descriptor specifies neither Landscape
nor Portrait as the font orientation. The font file is invalid
and will not be accepted by the Laser Jet.
ERROR: Font Descriptor Data not found at top of file
CTABLE could not find the font Descriptor and complete its job.
No .TAB file will be produced after this error.
Error Trying to read font file.
The named file was not found. Check the file name and try again.
APPENDIX 2 - REVISION RECORD
Version 1.0 - Released 7/22/87
Support for PC-Write.
limited to characters 32-126.
Version 1.2 - Released 8/9/87
Support for XyWrite Added.
Support extended to include all ASCII characters through
decimal 255 except the non-printing characters (0, 7-15,
and 27)
CTABLE now generates Laser Jet font selection escape
sequences in addition to reading character widths.
Automatic recognition and Special handling of
GLYPHIX v1.0 font selection escape codes.
Documentation completely rewritten.
Version 1.21 - released 8/18/87
Corrected error in the font selection escape string. The
third character is a lower case "l" (ell) not an upper
case "I" (eye).
Program was filtering out ASCII character 1 (decimal), now
it is allowed.
Modified to support symbol sets not defined by HP.
New parameter /V (verbose) Displays the Font Descriptor
information of the font file being read.
Version 1.30 released 9/12/87
Added support for Microsoft Word
Corrects a bug in handling fonts with negative values for
stroke weight (lighter than normal fonts).
Fonts from GLYPHIX v2.0 no longer require special
handling.
Version 1.37 released 11/1/87
Now uses pitch specification in the escape sequence for
fixed fonts only. Pitch is ignored for proportional
fonts on the Laser Jet
Corrects a bug affecting only the XyWrite Standard Width
definition.
If installed for XyWrite, characters 26, 174, 175, and
255 are also filtered because these have a special use or
present special problems to XyWrite.
/D parameter added to disable character filtering.
/Z option filters only control Z.
Verbose information (/V parameter) now written into .TAB
file as well as to screen.
Suboptions to verbose parameter:
/VL : Look only. No .tab file produced.
/VL : Screen only. Verbose info not added to .tab file.
Updated to support Laser Jet Series II fonts.
Color Selection added to installation menu.
Correct handling of negative stroke weights again.
Previous correction in version 1.30 was dependant on
erroneous information from a HP technical representative.
APPENDIX 3 - FONT GENERATION SOFTWARE
As of the date of this release I am aware of three different sources
for font generation software. Below I report the Names, addresses, and
list prices for their software. I have no affiliation with any of these
companies. I have personal experience with only the least expensive of
these packages, GLYPHIX, and am a satisfied user of GLYPHIX fonts.
GLYPHIX $99
SWFTE International, Ltd.
P.O. Box 219
Rockland, DE 19732
800-237-9383
302-658-1123
FontGen IV Plus $250
VS Software
P.O. Box 6158
Little Rock, AR 72216
501-376-2083
Laser Fonts $180
SoftCraft Inc.
16 N. Carroll St. #500
Madison, WI 53703
800-351-0500
608-257-3300