mirror of
https://github.com/wwarthen/RomWBW.git
synced 2026-02-06 22:43:15 -06:00
Trying to make sense out of the disk image creation process so that it is easier to maintain going forward. This is just the initial round of changes.
139 lines
7.0 KiB
Plaintext
139 lines
7.0 KiB
Plaintext
ZDEPROP.DOC
|
||
Proportional Spacing with ZDE
|
||
June 2, 1990
|
||
Carson Wilson
|
||
|
||
1. INTRODUCTION.
|
||
2. USING ZDE'S PROPORTIONAL FORMATTING FEATURE
|
||
3. INSTALLATION AND CUSTOMIZATION.
|
||
|
||
|
||
1. INTRODUCTION.
|
||
|
||
ZDE version 1.6 incorporates an elemental proportional formatting
|
||
feature. This option is useful only to those whose printers have
|
||
proportional spacing capabilities. Proportional formatting allows
|
||
you to format ragged right text properly for proportional output.
|
||
Centering and right justification of proportional text are not
|
||
available.
|
||
|
||
|
||
2. USING ZDE'S PROPORTIONAL FORMATTING FEATURE
|
||
|
||
Proportionally spaced printing gives a more professional look,
|
||
allowing more characters to be printed on a line without
|
||
crowding. This is because less space is allocated to narrow
|
||
characters like "i" and more to wide characters like "M." Most
|
||
computer printers do NOT allow proportional spacing; only laser
|
||
printers, some daisy-wheel equipment, and newer dot-matrix
|
||
printers have this ability. Typically, there is a special set of
|
||
instructions which when sent to the printer, cause it to use
|
||
proportional spacing rather than monospacing. On some models
|
||
(the Silver Reed SR550 for example), DIP switches also control
|
||
this feature.
|
||
|
||
ZDE does not itself perform proportional spaced printing; it
|
||
simply allows you to format your text for use with a printer that
|
||
has this capability. You must instruct your printer to space
|
||
proportionally before sending text to it. If you have tried using
|
||
the proportional capability of your printer, you probably have
|
||
noticed that LINES WITH LOTS OF WIDE CHARACTERS IN THEM
|
||
print out much wider than lines comprised of narrow characters.
|
||
ZDE 1.6 allows you to compensate for this by counting the width
|
||
of each character when it formats a paragraph (^B command), and
|
||
wrapping each line when its width count reaches the equivalent
|
||
of the current right margin setting.
|
||
|
||
The ^OJ command toggles this feature on and off [the default may
|
||
also be installed with ZDENSTAL]. When proportional spacing is
|
||
active, the legend "PS" appears in ZDE's status line (this is
|
||
overwritten by "MR" when the margins are released).
|
||
Proportional spacing occurs only during the ^B reformat command,
|
||
not during wordwrap, so to format a document proportionally, you
|
||
must use ^B at the beginning of each paragraph after you key it
|
||
in. Still, the results are well worth the extra trouble, especially
|
||
for material that will be reproduced.
|
||
|
||
|
||
3. INSTALLATION AND CUSTOMIZATION.
|
||
|
||
ZDE comes preconfigured to format text for proportional spacing
|
||
with Epson's new LQ510 dot matrix printer. Since most printers
|
||
allocate roughly the same ratios of space to the various
|
||
characters, there is a good chance you won't need to install ZDE
|
||
for your printer. This file has been formatted for proportional
|
||
output by ZDE; try printing it proportionally to see the results.
|
||
|
||
If you should decide to change ZDE's proportional spacing to
|
||
match your printer, you can patch ZDE's offset values for
|
||
individual characters. The offsets are stored in a sequential
|
||
ASCII table whose location is given by ZDENSTAL's "F" option.
|
||
The table consists of positive and negative (2's compliment) byte
|
||
values, one for each character beginning with " " and going
|
||
through "~". As distributed, all of the values are either -12, -6,
|
||
0, +6, or +12. The negative numbers are expressed as (256+n),
|
||
where n is the negative number. So for example, -6 is expressed
|
||
as (256+(-6)) or 250 (FA hex).
|
||
|
||
ZDE uses its ASCII table as follows. When reformatting a line,
|
||
ZDE counts each character as (30+table value)/30 of a column
|
||
wide. So if the offset is zero, the character is one column wide
|
||
(30/30 = 1) and ZDE increments the current column by one. If
|
||
the character's offset is -6, it counts as only (30+(-6)/30) or
|
||
24/30 columns wide, and ZDE increments the current column by
|
||
only 24/30. If the character's offset is +12, it counts as 42/30
|
||
columns wide, and so on. When a full column is "lost" due to
|
||
characters with negative offsets, ZDE adds the next character to
|
||
the line without incrementing the column count. Similarly, when
|
||
enough "extra" columns are counted to equal a full character, ZDE
|
||
increments its column count without actually adding another
|
||
character to the line.
|
||
|
||
To see the effects of this, try reformatting a paragraph or two,
|
||
first with PS on, then with it off. Lines of wide characters are
|
||
shortened on screen, while lines of narrow characters are allowed
|
||
to extend beyond the right margin. When the text is printed
|
||
proportionally, your printer reverses the process. Lines of wide
|
||
characters are lengthened and lines of narrow characters are
|
||
shortened, the net result being proportionally spaced text with an
|
||
even right margin.
|
||
|
||
If your printer's proportional output is not properly compensated
|
||
for by ZDE, it is possible to install another offset table within
|
||
ZDE to suit your needs. The current table's address is given by
|
||
ZDENSTAL's "F" option. To find the location of a character's
|
||
offset, add its ASCII value to ZDE's table address and subtract
|
||
32. For example, the ASCII value for "A" is 65, so the location of
|
||
"A"'s offset is (table address+65-32) or (table address+33).
|
||
|
||
You may adjust a character's offset to any value between -34 and
|
||
+35 decimal, but keep in mind that offsets if less than -29 may
|
||
result in lines that _never_ reformat since characters with
|
||
offsets of -30 or less take up no virtual space or less! To
|
||
calculate the proportional ratios used by your printer, it is best
|
||
to print out a line of thirty of each character in proportional
|
||
mode and compare the length of each line to the others. Most
|
||
characters should result in lines of roughly the same length; this
|
||
is your "base" length, and you should set the offsets of these
|
||
characters in ZDE to 00. Other lines will probably fall into four
|
||
or so other lengths; hopefully these lengths will correspond to an
|
||
even xx/30ths of the "base" length. To get the proper offset
|
||
value, just subtract the number of characters equal in length to
|
||
a line of "base" characters from 30. For example, if only 18
|
||
capital "M"'s take up the same length as 30 base characters, the
|
||
offset for "M" is 30-18 or +12. If it takes 42 "i"'s to equal the
|
||
length of 30 base characters, the offset for "i" is 30-42 or -12.
|
||
|
||
Once you have determined the offsets in 30ths of each
|
||
character's width from the base length, just plug these values
|
||
into ZDE's proportional table. You can use a patcher to alter a
|
||
few characters. For extensive modification, I have provided the
|
||
assembly language file ZDEPROP.Z80 which can be assembled to a
|
||
.HEX file overlay file for ZDE. Before assembling ZDEPROP.HEX,
|
||
you must edit the file and set the equate TABLE to the current
|
||
address of ZDE's proportional spacing table as given by
|
||
ZDENSTAL. Then overlay ZDE with ZDEPROP.HEX using MLOAD,
|
||
SID, or DDT.
|
||
|
||
- End of ZDEPROP.DOC -
|
||
|