home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The World of Computer Software
/
World_Of_Computer_Software-02-387-Vol-3of3.iso
/
h
/
htmix20.zip
/
FE.ZIP
/
FE.DOC
next >
Wrap
Text File
|
1992-07-12
|
8KB
|
210 lines
┌───────────────────────────┐
│ │
│ Font Editor 2.0 │
│ │
└───────────────────────────┘
Written by
Harald Thunem
1.SHORT DESCRIPTION
───────────────────
This package contains a few programs to create, edit and load
ASCII font characters in text-mode. There is also a UNIT, which
can be used in any Turbo Pascal program written in versions
4.0 - 6.0 (I think). I have seen several programs that define
new characters in text-mode (like Norton Utilities' Radio Buttons
and Chech Boxes), but I wanted to make a program where you can
create and edit your own.
2.THE FILES
───────────
FE.EXE - The font editor program
FE.PAS - Program source
FE.DOC - This file
LOADFNT.EXE - Program to load a font from file
LOADFNT.PAS - Source code for LOAD
FEUNIT.TPU - Unit containing a couple of procedures and
functions
FEUNIT.PAS - Source code for FEUNIT
STANDARD.FNT - Standard ASCII font file (norwegian)
MODERN.FNT - Modern font file
3.REQUIREMENTS
──────────────
VGA - it works reasonably well on EGA, but you'll have to make
your own standard font.
DOS 3.x or higher
4.HOW TO USE THE FONT EDITOR
────────────────────────────
Start it up with the command
FE [fontfile[.ext]]
where fontfile is the name of the file containing the font
you want to edit. If this is left out, the program will use
the file STANDARD.FNT. If this file is not in the current
directory, the program terminates.
If you want to make a new font, copy one of the font files
to another file, and edit that.
The program will display all the characters (0-255) in a
separate window on the right of the screen. The character
being edited will be highlighted. On the left is the editor window.
8 7 6 5 4 3 2 1 Value ASCII Chart
1 $00
2 $00 !"#$%&'()*+,-./0123456789:;<=>?
3 ███ $10 @ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_
4 █████████ $38 `abcdefghijklmnopqrstuvwxyz{|}~
5 ██████ ██████ $6C ÇüéâäàåçêëèïîìÄÅÉæÆôöòûùÿÖÜ¢£¥₧ƒ
6 ██████ ██████ $C6 áíóúñѪº¿⌐¬½¼¡«»░▒▓│┤╡╢╖╕╣║╗╝╜╛┐
7 ██████ ██████ $C6 └┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀
8 █████████████████████ $FE αßΓπΣσµτΦΘΩδ∞φε∩≡±≥≤⌠⌡÷≈°∙·√ⁿ²■
9 ██████ ██████ $C6
10 ██████ ██████ $C6
11 ██████ ██████ $C6
12 ██████ ██████ $C6
13 $00
14 $00
15 $00
16 $00
8 7 6 5 4 3 2 1
The program will start at ASCII character 65, which is the
capital A. To edit the character, move the cursor with the
arrow keys and press [space] to toggle the value. You will
see the character change both in the editor window, in the
ASCII table window and anywhere else on the screen where that
character is written.
You should save the font to file every time you finish editing
a character. Press F2 to save.
To select a new character to edit pressing Tab. Use the arrow
keys to move and Return or Tab to select. You can switch between
editing and selecting quickly by pressing Tab.
To quit the progam press Esc. You will be asked whether you
would like to save the font to file.
The available commands are:
F1 ■ Displays a help screen
F2 ■ Saves the font to file
F3 ■ Loads a new font from file
Alt-F ■ Sets the editing in fill mode. This means that when you
move the cursor, the program will fill that position.
Alt-E ■ Sets the editing in erase mode. This is the opposite of
fill mode.
Alt-N ■ Returns the editing to normal mode, where you have to
press Space to toggle the value at the cursor.
Tab ■ Switch between character editing and selection.
Esc ■ Quit the program
When you have left the program, the font you have been working
on will still be active, so if you want the original font back,
you can give the command
MODE CO80
at the DOS prompt.
5.HOW TO USE LOADFNT
────────────────────
This program just loads a font from file. Call it with the
command
LOADFNT fontfile[.ext]
just as with FE. To remove the font, give the command
MODE CO80
6.HOW TO USE THE UNIT
─────────────────────
The unit contains three procedures / functions :
procedure LoadOneChar(Number : byte; var C : OneChar);
procedure LoadUserFont;
function ReadFontFile(FontFileName : string) : boolean;
The procedure LoadOneChar is used load one character (surprise)
into the memory. Number is the ASCII number, so if you want to
load a new definition of capital A, the number is 65. The VAR
definition of C is
type OneChar = array[1..16] of byte;
var C : OneChar;
This is the bit pattern of the character. To define a capital A :
Command in program: Bit pattern:
.
.
C[1] := $00; { 00000000 }
C[2] := $00; { 00000000 }
C[3] := $10; { 00010000 }
C[4] := $38; { 00111000 }
C[5] := $6C; { 01101100 }
C[6] := $C6; { 11000110 }
C[7] := $C6; { 11000110 }
C[8] := $FE; { 11111110 }
C[9] := $C6; { 11000110 }
C[10] := $C6; { 11000110 }
C[11] := $C6; { 11000110 }
C[12] := $C6; { 11000110 }
C[13] := $00; { 00000000 }
C[14] := $00; { 00000000 }
C[15] := $00; { 00000000 }
C[16] := $00; { 00000000 }
LoadOneChar(65,C);
.
.
The two other utilities are usually used together to load an
entire font into memory. The function ReadFontFile will return
TRUE if there were no problems reading from the specified file.
The procedure LoadUserFont will load the font into memory.
Use the TP commands :
.
.
if ReadFontFile('STANDARD.FNT') THEN
LoadUserFont;
.
.