home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Loadstar 247
/
247.d81
/
t.scrn2font
< prev
next >
Wrap
Text File
|
2022-08-26
|
4KB
|
153 lines
u
S H P 2 F O N T
by Dave Moorman
SCRN2FONT is a step-by-step
utility. First, you must have your
bitmap graphic in the SHP format,
which is easy to do with STBPRINT.
Then you can choose the disk drive the
SHP file is on by clicking on
[1. Disk Drive]
(or press <1>). Then select the
drive.
Now on with the work. Choose
[2. Get SHP]
A scrolling menu of *.SHP files is
offered. Click the mouse or press
<BACK ARROW> to return.
[3. Make FTS]
You [must] choose a SHP file before
this action can happen.
An FTS file has font, screen, and
color information. You will be asked
if you want to use 256, 192, 128, or
64 font characters -- or Not do it at
all. More characters dedicated to the
image mean less for alphanumeric text.
The program looks at each 8-byte
cell of the bitmap screen and compares
it to the cells already recorded in
the font. Font characters are used
over again if they match. Otherwise, a
new character is created, copying the
8-byte cell from the bitmap. That
character is place on the text screen.
If you run out of available
characters in the font, the process
just stops. Either way, you can save
the result as an FTS file (with [5.
Save File]).
Remember, cells that are identical
use the same font character. So large
patches of clear cells will use only
one character.
[5. Make Block]
The alternative to replicating the
whole bitmap is to make a block that
contains 128 or 196 characters. Again,
a SHP file must be chosen with [1.]
before this action will work.
When the bitmap is displayed, a
single square will follow the mouse
arrow around. Click to place this
square in the upper left corner of the
area you want to capture. Once you
have clicked, three other squares move
in concert with the mouse arrow to
designate the other corners of the
block. When you have the block
defined, click again.
If you goof up, press <BACK ARROW>
to return to the first phase. During
the first phase, <BACK ARROW> will
return you to the main menu.
During the first phase, a Right
Click will change the color of the
blocks. A Right Click during the
second phase toggles between 192 and
128 font characters available for the
block. The squares will not move
outside the given available space.
However, when you toggle to 128
characters, you will want to move the
squares closer together then out again
to mark the correct amount of area.
[5. Save]
This action will not work unless
you have made an FTS or a Block. Then,
it will automatically save the
appropriate file format. Just type in
the name. If the file name exists on
the disk, a warning will appear.
[6. Exit]
Returns you to LOADSTAR or BASIC.
The BLOCK File
--------------
Putting the Block on the screen is
fairly easy -- even in BASIC. I
reserved the last three bytes of the
font (character screen code 255) to
record the starting character, the
width, and the height of the block. If
you are using DotBASIC, the custom
font is at 2048. Bload the font with
the Block with:
.bl,"f.block",dv,2048
Then get the beginning screen
code:
bc=peek(4093):rem font+2045
Set the upper left corner of the
block with:
bk=1024+by*40+bx
(where bx/by is the cell
coordinate of the block position.)
Now you can use FOR-NEXT loops to
put the block on the screen.
for y = 0 to peek(4095):rem font+2047
for x = 0 to peek(4094):rem +2046
poke bk+y*40+x,bc:bc=bc+1
next
next
ML would be quicker. You write it!
DMM