Added upstream from http://ftp.icm.edu.pl/pub/loglan/
[loglan.git] / sources / new-s5r4 / graf / doc / fedit.doc
1
2         FEDIT - a simple font editor for IBM PC
3                 a companion to IIUWGRAF graphics library
4
5 FEDIT allows to create and modify 8*8 pixel patterns. Such
6 patterns may be displayed as part of graphics screen image
7 via the "hascii" function.
8
9 Font tables can be prepared by FEDIT in two formats:
10
11         - as an assembly subroutine,
12           delivering address of the font table
13           in the form suitable for passing to "hfont"
14         - as an independent program,
15           setting up pointer to the font table in 
16           the location of interrupt vector 31.
17
18 The first format can be used to replace the standard font
19 usually found in ROM BIOS at location F000:FA6E. It is used
20 by "hascii" for drawing character codes 0 to 127. The subroutine
21 generated by FEDIT has to be linked together with the application.
22 This is "base 0" format.
23 FEDIT generates the subroutine with the name "hfont8". Should 
24 another name be desired (e.g. when font tables are to be switched
25 dynamically), it may changed by hand in the assembly source.
26
27 The second format is used when drawing characters from the
28 extended range 128 to 255. This font has to be loaded into
29 memory before execution of the application program that
30 uses it by invoking the program generated by FEDIT.
31 This is "base 128" format.
32 FEDIT generates this table as part of an independent program,
33 that sets up the vector address and exits via "terminate and
34 stay resident".
35 FEDIT and HGCGRAPHICS do not provide facilities for dynamic
36 switching of this extended font table.
37
38
39 For example,
40
41                 integer*2 iseg,ioffs
42                 call hfont8(iseg,ioffs)
43                 ...
44                 call hascii(45)         ; uses ROM BIOS
45                 call hascii(145)        ; extended table
46                 ...
47                 call hfont(iseg,ioffs)
48                 call hascii(45)         ; uses FEDIT font
49                 call hascii(145)                ; same extended table
50                 ....
51                 call hfont(16#f000,16#fa6e)
52                 call hascii(45)         ; ROM BIOS again
53                 call hascii(145)                ; same extended table
54
55
56 FEDIT is a simple conversational program with few commands. The basic
57 idea is to have a table of 8*8 pixel patterns that can be modified
58 interactively. A single character can be brought out of the table for
59 editing and returned, possibly to a different position in the table.
60 There are two tables, one for character codes 0 through 127, the other
61 for codes 128 through 255. The first table is read-only. The second table
62 can be initialized by an already resident extended font table, loaded
63 from a FEDIT-created file or initialized as empty.  The second table can be
64 written out to file in one of two formats discussed above.
65
66 FEDIT commands are entered as single keystrokes selecting the commands
67 listed in a menu appearing on top of the screen.
68 Additional parameters, if any, are prompted for.
69
70 FEDIT commands:
71
72 <       low                     redisplays the 0 to 127 table
73
74 >       high            redisplays the 128 to 255 table
75
76 i       init            initializes 128 to 255 table to all zeros
77
78 l       load            loads the 128 to 255 table from file;
79                                 asks for the file name
80
81 d       dump            dumps the 128 to 255 table to file;
82                                 asks for the file name;
83                                 asks for base, which should be either 0 or
84                                 128, indicating one of the two formats
85                                 asks for target:
86                                         f - ms fortran, ms pascal
87                                         s - lattice c, s model
88                                         p - lattice c, p model
89                                         d - lattice c, d model
90                                         l - lattice c, l model
91
92 e       edit            brings a character into the editing area
93                                 asks for a character code (in decimal);
94                                 during editing, cursor keys may be used
95                                 to select pixel position, "INS" to set
96                                 the pixel on, "DEL" to set it off, "END"
97                                 to exit edit mode.
98
99 t       text            accepts a short text that will be displayed
100                                 during the editing as an additional help
101                                 for judgement of the quality of the appearance
102                                 of currently edited character;
103                                 asks for vspace & hspace : horizontal & vertical
104                                 spacing between adjacent character boxes,
105                                 then waits for a string (at most 40 chars).
106
107 p       put                     saves the pattern in the editing buffer
108                                 in the font table;
109                                 asks for a code (in decimal) which should
110                                 be in the range 128 through 255
111
112 q       quit            exits from FEDIT
113
114 FEDIT is not foolproof, e.g. it will not survive an attempt to load
115 a non-existing font file and it will overwrite an existing file
116 without warning if asked to.