home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Simtel MSDOS 1992 December
/
simtel1292_SIMTEL_1292_Walnut_Creek.iso
/
msdos
/
sprint
/
spfonts2.arc
/
SPFONT.SPR
(
.txt
)
< prev
next >
Wrap
Sprint Document
|
1989-06-27
|
11KB
|
207 lines
R 75,T 5
HEADINGB What is SPFONT?
SPFONT uses the graphics mode of a CGA or Hercules Graphics Card (models
GB101,GB102) to display characters of different fonts (bold, italic, etc.)
when using Borland's Sprint. As well, the Hercules version displays 43
lines of 90 columns, almost double the number of characters displayed in 25
by 80 mode.
HEADINGC New in SPFONT v0.3f
SPFONT v0.3f has added a number of new features:
BEGIN HYPHENS, Spread 0
A version using characters that are 12 dots high giving 29 lines by 90
columns on Hercules displays.
SPFONT can be "uninstalled" from the DOS command line.
Cursor handling enhancements, settable from the DOS command line or from
within a Sprint macro.
END HYPHENS
HEADINGB Installing SPFONT
SPFONT is available in three different versions:
BEGIN ASTERISKS
SPFONT25.COM displays 25 lines by 80 columns (using 8 dot high characters)
on a CGA.
SPFONT29.COM displays 29 lines by 90 columns (12 dot characters) on a
Hercules adapter.
SPFONT43.COM displays 43 lines by 90 columns (8 dot characters) on a
Hercules adapter.
END ASTERISKS
The symbol
SPFONTnn
= 25, 29 or 43) will be used to specify the
particular version of SPFONT that the user is interested in installing.
HEADINGC The Distribution Files
Compuserve's BORAPP LIB 16 contains four SPFONT files. All are in packed
format to minimize download time. Borland's UNPACK program, available on
Sprint Disk #3, can be used to unpack the files.
The four files are:
BEGIN DESCRIPTION
SPFNT1.ARC@/contains SPFONT29.COM, SPFONT43.COM (both for Hercules)
SPFONT29.SPS and SPFONT43.SPS. These are the only files needed to run
SPFONT. SPFNT1 also contains two Sprint documents: SPFONT.SPR, which is
this documentation file that you are reading, and FONTS.SPR, a sample file
that displays all characters in each font.
SPFNT2.ARC@/contains SPFONT25.COM (for CGA), SPFONT25.SPS, SPFONT.SPR and
FONTS.SPR.
SPFNT3.ARC@/contains SPFONT8.FNT, SPFONT12.FNT, SPFONT.SPL, SPFONTED.EXE,
SPFONTLD.EXE. These files allow you to modify the character shapes and
incorporate those changes in your copy of SPFONTnn.COM. I have to
apologize; some of the fonts (bold, italic & bold-italic) where "built"
from the Plain font by computer program. For other fonts (Large, Sub- &
Superscript), I have not entered all the characters. I would hope that
someone who enjoys font design would download SPFNT3 and clean-up the
fonts.
SPFNT4.ARC@/contains SPFONT.ASM, SPFONT.MAK, SPFONTED.C and SPFONTLD.C.
These are the sources for SPFONT and the utilities for anyone who wants to
extend or improve SPFONT. The programs are written in TurboC and Turbo
Assembler.
END DESCRIPTION
HEADINGC Command-Line Options
SPFONT has the follwing command line options:
BEGIN DESCRIPTION
/i@/Install. This argument is required for SPFONT to install itself in
memory. If /i is not specified, SPFONT will print a quick summary of
options and will return to DOS without doing anything.
The Hercules version of SPFONT verifies that a Hercules graphics card
exists before installing itself. If one cannot be found, SPFONT will print
a diagnostic message and return to DOS without installing itself. If a
Hercules card is found, then when SPFONT is "active" (in Sprint) SPFONT
will configure the card for "HALF" operation; that is, only one graphics
page is used and SPFONT can work in systems that have both Hercules & CGA
cards connected. Outside of Sprint, the card is reprogrammed for "TEXT"
operation only.
/u@/Uninstall. If SPFONT is the last TSR (Terminate-and-Stay-Resident)
program loaded and no other programs have stolen away the video & timer
interrupt vectors used by SPFONT, then /u will cause SPFONT to remove
itself from memory. The /i and /u options are most often used in a batch
file to load SPFONT just before Sprint and to remove SPFONT after Sprint is
finished.
/p@/Plain font only. SPFONT contains 8 font tables at 2K each plus about
2K of its own program code, for a total of 18K. Users who only want to use
SPFONT for its 43*90 display can request that SPFONT install only the plain
font in memory, thereby saving over 12K of precious memory. Any requests
to print a character in a font other than plain will print the character in
reverse video.
/b@/Blink off. Sprint will start with a non-blinking cursor. This option
is most useful with laptop computers where the visibility of the cursor
depends on the bightness & contrast settings of the display.
/k@/Block cursor. Sprint will start with a block cursor.
/a@/Adjust cursor size. Most macros (including the BlockCursor and
ULCursor in the standard Glossary of Sprint v1.01) are written to recognize
to types of display: CGA, with 8 dot high characters, and MDA/EGA, with 14
dot high characters. To most of these macros, SPFONT looks like a CGA
screen even when running on a Hercules. When used with the 12 dot high
characters of SPFONT29, commands to change the cursor size end up either
making a cursor of the wrong size, putting the cursor in the wrong place,
or both. The /a option allows SPFONT to adjust cursor size changes for the
CGA to values that make sense for the 12 dot high font.
END DESCRIPTION
HEADINGC Recommended Installation
Put the two files SPFONTnn.COM and SPFONTnn.SPS in your \SPRINT directory
and make sure that your PATH statement contains "C:\SPRINT".
To your AUTOEXEC.BAT file, add the line:
SPFONTnn /i /a
If you do not already have a batch file that calls up Sprint, make the file
SF.BAT in your \SPRINT directory containing the line:
sp -s=SPFONTnn %1 %2 %3 %4 %5 %6 %7 %8 %9
Installing SPFONT once from the AUTOEXEC.BAT file saves time at the expense
of having SPFONT lie around in memory when not in use. If you would rather
save memory, make the following SF.BAT file in your \SPRINT directory:
SPFONTnn /i
sp -s=SPFONTnn %1 %2 %3 %4 %5 %6 %7 %8 %9
SPFONTnn /u
HEADINGC Important Note
Sprint versions 1.00 and 1.01 have a problem after printing, paginating or
doing a screen preview when SPFONT is active. The editor passes the name
of the SPFONT screen driver to the formatter, but the formatter forgets to
pass it back when it returns to the editor! So after any print operation
the screen reverts to normal text mode.
To prevent this situation from happening, press F10/Utilities/Macro/Enter
then enter the line:
34->parg ovlwrite "%"
and (E)xecute the macro. This will prevent the formatter from overlaying
the editor during printing to that the editor will remember reactivate
SPFONT after printing. This change will stay in the SP.OVL file until you
select a new User Interface.
HEADINGB Using SPFONT
If you made one of the SF.BAT files as recommended above, then you can
start Sprint by typing SF instead of SP. Only when editing documents or
printing a Screen Preview will the screen stay in 29 or 43 line mode. If
you execute a DOS command with F10/Utilities/DOS Command, SPFONT will
revert back to the display's standard 25 line mode while the command
executes.
HEADINGC Manipulating the Cursor
Sprint macros can be used to change the cursor in three ways:
BEGIN ASTERISKS
Enable/Disable blinking. The following macro will toggle the blinking
state of the cursor:
ToggleBlink:
(hardware "2>al 16 int 10h" ^ 1) hardware ">al 16 int 10h"
Change its size. The BlockCursor and ULCursor Glossary entries can be used
to change the size of the cursor. It is also possible to write macros to
indicate the current insert/overwrite mode via the cursor's size.
Display a
cursor! This feature was put in for the benefit of users
who like the 43 line display but have trouble locating the cursor. SPFONT
contains a function that will turn the cursor into a huge "cross" that
inverts all characters in the same row and same column as the normal
cursor. (It really has to be seen to be believed!) The following macro,
which assigns itself to the Alt-Shift-C key sequence, will blink the huge
cursor 5 times and then revert back to normal.
FindCursor :
hardware "1>al 16 int 10h" int oldblink ; turn on blink
hardware "1>al 17 int 10h" int oldcross ; make huge cursor
2200 wait ; time for 5 blinks
oldcross hardware ">al 17 int 10h" ; restore cursor shape
oldblink hardware ">al 16 int 10h" ; restore blink
~c : FindCursor ; assign to Alt-Shift-C
END ASTERISKS
HEADINGB SPFONT and TSRs
Since SPFONT puts the screen into graphics mode to do its work, not all
TSR (Terminate-and-Stay-Resident) programs can safely "pop-up" and restore
the display to its original settings when finished.
Two solutions are available. First, you can press F10/Utilities/DOSCommand
and enter no command, which will deactivate SPFONT mode and call up a copy
of DOS. AT this point it is safe to press the "hotkey" for your TSR.
After your are finished with you TSR, type "exit" and Sprint will restore
the display.
The second solution is to enter the follwing macro, compile it and assign
SafeToHotkey to a key. Whenever you want to call up a TSR, press the key
that will execute SafeToHotkey first.
SafeToHotkey :
hardware "254>al 0 int 10h" ; out of SPFONT
rawout "Press any key to return to Sprint ...\n"
GetKey
hardware "255>al 0 int 10h" ; back into SPFONT
redraw draw ; and refresh the screen
HEADINGB Editing SPFONT.FNT
The program SPFONTED is a simple, but usable, font editor for modifying the
supplied font file. Just type
SPFONTED SPFONThh.FNT
(where hh = 8 or 12, depending on which font file you want to edit) and
follow the information given onscreen. SPFONTED will allow you to save a
modified font file under a different name so that you can experiment making
different fonts without burning your bridges behind you.
To "load" a modifed font file into the working SPFONT program, type the
command
SPFONTLD <comfile> <fontfile>
For example,
SPFONTLD SPFONT29.COM SPFONT12.FNT
will update the SPFONT29.COM program with a new copy of the SPFONT12.FNT
file. The next time that you run SPFONT29 /i the new fonts will be
available in memory.
HEADINGB Modifying SPFONT
The file SPFNT4.ARC contains the sources to SPFONT, SPFONTED and SPFONTLD
programs. SPFONT can be regenerated with the command
MAKE -fSPFONT.MAK
whereas the font editor & loader programs can be recompiled with
TCC SPFONTED.C
or TCC SPFONTLD.C
The source and executable programs are supplied AS IS without any
warranties of any kind (this is usual disclaimer although these programs
are a reflection of my personal & professional reputation).
HEADINGB For more information
If you have any questions, comments or suggestions for improving SPFONT,
please don't hesitate to contact me. (On the other hand, if you have
scathing criticisms, please take your time!)
Andrew D. Morrow[Android]
Compuserve 73627,2165