home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Media Share 9
/
MEDIASHARE_09.ISO
/
fonts
/
edv340.zip
/
EDV340.EXE
/
EDV.DOC
< prev
next >
Wrap
Text File
|
1992-12-09
|
15KB
|
309 lines
EDV - A font editor for VGA fonts, written by Rick Owens.
Version 3.40 (beta)
Are you tired of your drab, boring screens? Does your VGA have a weird
character set? If so, there's hope! If you have a VGA display, you can load
any number of interesting fonts; with EDV, you can edit those fonts to your
heart's content.
Legal junk:
This program is freeware, and is copyrighted 1992 by Rick Owens. You are
under no obligation to send money to me (or anyone else, for that matter) for
this program. In fact, I do not want this program to be distributed for a
fee; you may give it away to anyone, but you may not charge them money beyond
a reasonable cost for copying. (For example, this program can be posted for
downloading on a subscription board.)
WARNING: You use this program at your own risk. If anything goes wrong, no
one else shall be held responsible for any problems you encounter.
Further warning: This is a Beta release, and may well have bugs in it.
I'm not releasing the source code yet (if ever), because it's probably going
to change radically before I'm done. However, if you can't live without some
particular bit of code, get in touch with me and we'll figure something out.
Notice that I haven't said anything about the fonts... that's because fonts
can't be copyrighted! If this is news to you, take a look at COPYFONT.DOC
(and if you've got access to the Federal Register, look up the reference).
Note: if you create a new font by modifying one of the ones in here, please
use a new name rather than overwriting one of the ones in this archive, as a
courtesy to everyone who gets a copy from you either directly or indirectly.
-----------------------------------------------------------------------------
Virus protection:
In order to protect this program against unauthorized modification, I've
included Kevin Dean's CRC module. If you ever get an error message telling
you this program has been modified, you _may_ have a virus in your computer.
Note that this is not certain; almost any modification, virus induced or not,
will stop the program. Unless you _know_ how the program was modified, you
should immediately scan your system for viruses using your favorite scanner,
just to be safe. (I've been lucky enough to be hit by only one virus, and
because of backups I was able to recover without too much trouble... I
suggest that you take similar precautions, so that your files don't become
statistics.)
Of course, this program is not completely safe from tampering; someone with
skill and patience could decompile the program and patch over the CRC checks.
However, simple mods (like a piggy-backed virus, or someone changing the text
of messages) will be caught.
To those who like PKlite, Diet, or some other program compressor: Sorry folks.
Compressing this program qualifies as modification _in spades_. If you're
tight for space on your hard drive, move EDV to a floppy, or unzip it onto a
RAM drive. Or, if you can afford it, get a bigger hard drive.
There's one other downside to this... disk accessing. The CRC check has to
find and read the executable wherever it resides, which will make for a
noticeable delay on slow systems. Again, I'm sorry, but them's the breaks,
folks.
-----------------------------------------------------------------------------
"Why?"
Good question; I'm glad you asked. :) I've always liked playing with fonts,
and VGA fonts are no exception. I found and started using the LOADFONT
program, and had lots of fun. However, there were some problems: lots of
the fonts were originally 8x14, which meant that boxes had annoying gaps in
them; some fonts that were too small (i.e., 8x14 or less); some fonts were
incomplete (e.g., no boxdraw characters at all), etc. Some of those things
can be corrected with a good binary file editor, but that's a kludge. So,
the next thing was to see if I could find a font editor. I found several,
but none were really satisfactory. So, I wrote my own. It doesn't have
fancy menus, or wonderful graphics (in fact, the interface is text only), and
it doesn't have all the features of other editors (yet, anyway!). But... it
does what I want, the way that I want (mostly, at least). On the assumption
that there are others who are interested in VGA fonts, I'm distributing the
editor and my collection of fonts. At this time, I don't plan to offer any
support for the program; however, if you want to get in touch with me with
suggestions, comments, criticisms, etc., feel free to do so. If possible
I'll reply.
As far as the name goes, it's short hand for "EDit Vga fonts". I pronounce
it "eedeevee", but you can pronounce it any way you want. :)
So, how do you use it? Type EDV and hit Enter! After a moment, you'll be at
the main edit screen, ready to go.
Notes on loading: if the file is less than 4096 bytes, the program will
assume that you're working with an 8 by n (where n < 16) font, and will
convert it on entry. The program will estimate the number of bytes (rows) per
character, then prompt you for the same value. If you like the estimate, just
hit Enter; otherwise, type the correct value. Note: this conversion does NOT
change the disk file. You must save the font to make the conversion stick.
The flip side of this is that if you want to keep the original, you should
edit a copy and leave the original file alone. Also, you can load fonts from
the command line; the format is "EDV <fontname> [<fontname> ...]" where
<fontname> is the full name of a font file (i.e., the base name and the
extension; the path is optional). Extra font names (i.e., a fifth name and
beyond) will be ignored.
The Edit screen is the heart of the program. Here you can view and edit the
characters in the font. The commands:
Key Command
--- -------
ESC Exit.
?,F1 Display help.
~ Set the change flag to false.
. Move to the next character.
, Move to the last character.
> Move forward ten characters.
< Move backward ten characters.
Tab Move to next frame.
BackTab Move to last frame. (BackTab is Shift-Tab.)
Home,
End,
Page Up,
Page Dn Move the cursor to the UL, LL, UR, or LR corner.
M Move to a particular character (hit the key for the character you
want to edit).
F try the font out.
D Return to the Default font (i.e., reset the VGA display).
= Copy rows C & D (12 & 13) over rows E & F (this helps when converting
8x14 fonts to 8x16).
F2 As above, but works on all box draw characters within font,
plus the top integral character, etc.
Alt-F2 Show characters for composite. This will change the index for the
non-active frames when you're looking at a composite character (e.g.,
character 131, 'â', which is composed of 'a' and '^'). This covers
letters with diacritics (i.e., acutes, graves, carets/circumflexes,
tildes, diaereses/umlauts, and cedillas), the ae digraphs, the cent
sign, the pound/sterling symbol, the yen symbol, the pesetas symbol,
the florin/guilders symbol, the fractions, the +/- symbol, the less
than or equal/greater than or equal symbols, and the division symbol.
Also, this command will help with the upside down ? and ! characters,
the fill characters (176-178, 219-223), the set intersection symbol,
and the superscripted 2 and n characters. Note: This won't do the job
for you; it just shifts the other frames to the appropriate
characters. This will only serve as a guide. _You_ will have to make
sure the buffers are loaded with the correct font (usually the same
one you're working on, but perhaps not always!), and _you_ will have
to do the combining/modifications. Some are easy; for instance, the
upside down ! and ? can be built by copying the original character,
then flipping the character both ways. Others, like the fractions and
the pound/sterling symbol usually have to be 'manually' built.
Alt-M or
Alt-O Merge another character into the current one. (This does a bitwise OR
with the specified character.)
Alt-X Same as Merge, except that the operation is XOR (eXclusive OR).
<space> Toggle the current bit/pixel.
S Save the current font.
Alt-S Save menu; allows you to save a font as a .COM file, a C source file,
a text file, or a raw font file (same as S, above).
L Load a font.
H Flip the current character horizontally.
V Flip the current character vertically.
C Copy another character. (Enter the frame # to copy from.)
I Import a range of characters from another font.
Note: The range is imported _starting at the current character_.
B Blank out the current character.
R Reverse the current character (i.e., toggle all bits).
Alt-D Display a directory of .FNT files.
To move the cursor around, use the arrow keys.
To draw, hold the left Shift key and use the arrows.
To erase, hold the right Shift key and use the arrows.
To shift the character, hold down the Control key and use the arrows.
To shift the current line, hold down the Alt key and use the left and right
arrows.
Note: Don't try to use the Move command to edit character 3; the ^C will
kill the program. Also, if you want to move to one of the high ASCII
characters, you don't need to use the M command, just enter the character
directly. (For those who don't know how to use this: Press and hold the Alt
key, type the ASCII value of the character you want on the numeric keypad,
then release the Alt key. This works with many programs.)
If you get strange results when loading a font, it's possible that you have
an 'impure' file, one that's got some other info at the start (e.g., size
indicators, a font name, possibly even a font loader). You'll need to
extract the font and put it into a file all by itself; you can do this by
using an editor that will handle binary files, or by using my Extract
program, or by writing a short program to do the extraction for you.
------------------------------------------------------------------------------
Save Menu:
Save normally is the same as S from the edit screen.
Save as text creates a text file with each bit map represented with
characters; see also the EDVA program. (If you use a programmable text
editor, you _might_ be able to set up something to let you type those large
characters. I know it can be done, 'cause I've done it on a PRIME
minicomputer with EMACS. However, it's not easy; usually it's not even
possible. If you're considering writing a stand-alone program to do this sort
of thing, I recommend using the original font files rather than text versions;
you'll save a lot of space that way.)
Save as C source code creates a file you can include with your variable
definitions; it defines a 4096 element static char array. If you're going to
be using a font or fonts in a program, I recommend that you just load the raw
font file from disk rather than incorporating it into the program. There's no
compile time penalty for this, and changing the font is much faster. However,
if you want to avoid disk accessing, or you're using a picture building font
(e.g., SMOOTH.FNT) which you're not going to be changing, this might be a
better way to go. Your choice.
Save in PC Mag VGA font loader puts an executable front end on the font and
saves it as a .COM file. The resulting program is self contained and ready
to run.
------------------------------------------------------------------------------
Possible future upgrades:
Fancy handling of the font Directory (Alt-D) command; right now it just
hands a DIR command to DOS.
Extension assumption (i.e., the .FNT extension would be implied by using only
the basename of a file).
TSR builder: this option would create a .COM file that would make a given
font resident (i.e., resistant to most mode changes). Actually, I'm working
on putting in a mode to save a font into any other program defined in a plain
text data file. This would let you use your favorite loader(s), TSR or not,
just by adding a line to the data file.
Storage of a 'default' font directly in the program.
Single column move: this would let you use the Alt-up arrow and Alt-down
arrow move a single column just as you can now move a single row.
Column/row insert and delete.
I'll add the above features when I have both the time and the interest (IOW
when I get 'round tuit :) ). If you'd really like to have one of the above
enhancements, or one that's not listed, feel free to contact me. I won't
guarantee anything, but I'll at least read your letter.
------------------------------------------------------------------------------
Thanks to:
Richard "Yes you _do_ need numbered lines!" Hardesty, for extensive beta
testing and the Russian font. (Enjoy your coffee, Richard! :) )
Hal Krause, sysop of Sparky's Corner, for making it possible for me to get
the font loader and most of the fonts, and for running a great board.
Ut (that's the way it's printed in the manual), the author of the Font Mania
font editor. Even though this program doesn't get along very well with my
system, it does have some good ideas in it!
Kevin Dean, for writing his CRC code and placing it in the public domain.
------------------------------------------------------------------------------
Well, that's about it... like I said, I hope you find this program of use!
Here's my address, in case you want to get in touch with me:
Rick Owens
P.O. Box 1572
Kalispell, MT 59903, United States
You can also probably get in touch with me on U'NI-net in the C-Programming,
Science, Programming, or ChitChat conferences, among others.
------------------------------------------------------------------------------
For those who would like to use a font in a C program, here's part of the
code from my editor:
void activate_font()
{
int x;
char far *font_buffer=fonts[current_font_num].buffer;
struct REGPACK r;
r.r_ax = 0x1110; /* Function and subfunction? */
r.r_bx = 0x1000; /* Bytes per character (16) and block to load to
(0 in this case). */
r.r_cx = 256; /* # of characters to load. */
r.r_dx = 0; /* Value of first character to load. */
r.r_es = FP_SEG(font_buffer); /* Segment of the table. */
r.r_bp = FP_OFF(font_buffer); /* Offset of the table. */
intr(0x10, &r);
.
.
.
Note the use of the far pointer and the intr() function.
------------------------------------------------------------------------------
Oh, one final note: to use the LOADFONT program, just type
LOADFONT <fontname>. Also, take a look at the included LF.BAT file
for one way to switch fonts on the fly. See the READ.ME file for more info.