Commit | Line | Data |
---|---|---|
4cb4277e C |
1 | .TH FED 1 9/21/80 |
2 | .UC 4 | |
3 | .SH NAME | |
4 | fed \- font editor | |
5 | .SH SYNOPSIS | |
6 | .B fed | |
7 | [ | |
8 | .B \-i | |
9 | ] | |
10 | [ | |
11 | .B \-q | |
12 | ] | |
13 | name | |
14 | .SH DESCRIPTION | |
15 | .I Fed | |
16 | is an editor for font files. | |
17 | It is display oriented and must be used on an HP 2648 graphics terminal. | |
18 | Fed does the necessary handshaking to work at 9600 baud on the 2648. | |
19 | .PP | |
20 | The | |
21 | .B \-i | |
22 | flag requests | |
23 | .IR "inverse video mode" , | |
24 | where all dots are dark and the background is bright. | |
25 | This provides a setting similar to the hardcopy output of | |
26 | the plotter, and is useful for fonts such as the shadow | |
27 | font where shading is important. | |
28 | .PP | |
29 | The | |
30 | .B \-q | |
31 | flag requests | |
32 | .IR "quiet mode" , | |
33 | where all graphic output is suppressed. | |
34 | This mode is useful on terminals other than the HP 2648 | |
35 | (assuming you are editing blindly) and for operations | |
36 | such as the # and A commands, since | |
37 | these operations do not make essential use of graphics, | |
38 | and since suppression | |
39 | of the graphic output speeds of | |
40 | .I fed | |
41 | considerably. | |
42 | .SH FONTS | |
43 | .PP | |
44 | A font is a collection of up to 256 | |
45 | .IR glyphs , | |
46 | each of which is some pattern or design. | |
47 | Glyphs are represented on Unix as a rectangular array | |
48 | of dots, each of which is either dark or blank. | |
49 | Each location in the array is called a | |
50 | .IR pixel . | |
51 | There are 200 pixels per inch due to the hardware of the | |
52 | Versatec and Varian plotters. | |
53 | .PP | |
54 | Each glyph has, in addition to its bit pattern, a | |
55 | .I base | |
56 | and a | |
57 | .IR width . | |
58 | The base is a point, typically near the lower left of the array, | |
59 | that represents the logical lower left point of the glyph. | |
60 | The base is not restricted to be within the array, in fact, it is usually | |
61 | a few locations to the left of the edge. | |
62 | The vertical position of the base defines the | |
63 | .IR baseline , | |
64 | which is held constant for all glyphs when a line is typeset. | |
65 | Letters with descenders, such as ``g'', go below the baseline. | |
66 | Other glyphs typically rest on the baseline. | |
67 | .PP | |
68 | The width is used by | |
69 | .I troff(1) | |
70 | to determine where to place the next glyph. | |
71 | It need not be the same as the width of the array, although it is usually | |
72 | about the same. | |
73 | .PP | |
74 | The size of the array, location of the base, and the width can vary among | |
75 | glyphs in a font. | |
76 | Fonts where all glyphs have the same width are called | |
77 | .IR "fixed width fonts" , | |
78 | others are | |
79 | .IR "variable width fonts" . | |
80 | .PP | |
81 | Attributes which do not vary among glyphs include the | |
82 | .IR "font name" , | |
83 | which can be up to 11 alphabetic characters, and the | |
84 | .IR "point size" , | |
85 | which is a positive integer indicating the overall size of the font. | |
86 | A point is 1/72 inch. | |
87 | The point size of a font is the distance, in points, from the top of | |
88 | the tallest glyph to the bottom of the lowest. | |
89 | The software of troff currently restricts point sizes to | |
90 | 6, 7, 8, 9, 10, 11, 12, 14, 16, 18, 20, 22, 24, 28, and 36 point. | |
91 | Normal text is usually 10 point. | |
92 | .PP | |
93 | Font files conventionally have names of the form | |
94 | .br | |
95 | name.pointsize | |
96 | .br | |
97 | for example, ``bocklin.14'' to indicate 14 point bocklin. | |
98 | Fed will look for such a file in both the current directory | |
99 | and /usr/lib/vfont. | |
100 | Vtroff will only look in /usr/lib/vfont. | |
101 | .PP | |
102 | There is a correspondence between | |
103 | .I glyphs | |
104 | and | |
105 | .I characters | |
106 | in a font. | |
107 | For a given font, each glyph has an ASCII character associated with it. | |
108 | The glyph is obtained in troff by typing the assocated character, | |
109 | and in fed glyphs are also referred to by their character. | |
110 | However, it is not required for all characters to have a glyph, | |
111 | fonts never have more than 128 glyphs and usually have fewer. | |
112 | .PP | |
113 | There is usually a natural correspondence between glyphs and characters. | |
114 | For example, the glyph which is a roman lower case `a' will generally | |
115 | have the ascii character `a' as its corresponding character. | |
116 | In the special font, the Greek lower case alpha has `a' as it's corresponding | |
117 | character, upper case delta has 'D' as it's corresponding character, etc. | |
118 | However, special fonts such as the chess font have glyphs that do not | |
119 | appear to be related to their corresponding characters. | |
120 | .PP | |
121 | It is easy to confuse glyphs and characters. | |
122 | Note, however, that the three glyphs | |
123 | roman a, bold | |
124 | .BR a , | |
125 | and italic | |
126 | .IR a , | |
127 | are all different, yet all three correspond to the character `a'. | |
128 | When this is multiplied by the large number of font styles and point | |
129 | sizes, there are many glyphs that match a single character, | |
130 | (but only one in a particular font). | |
131 | .SH "FED ORGANIZATION" | |
132 | .PP | |
133 | Fed organizes the screen into 21 | |
134 | .I windows | |
135 | in a 3 by 7 array. | |
136 | Each window is 100 by 100 pixels, | |
137 | meaning that the maximum height and width of a glyph is 100 pixels. | |
138 | Since the HP 2648 has a resolution of 100 dots per inch, glyphs | |
139 | displayed on the screen and printer will be double the actual | |
140 | height and width, even when fully zoomed out. | |
141 | There is a | |
142 | .IR "current window" , | |
143 | which will be marked with a square border. | |
144 | There are two | |
145 | .IR pens , | |
146 | called | |
147 | .I fine | |
148 | and | |
149 | .IR bold . | |
150 | The fine pen is one pixel wide, | |
151 | the bold pen can range from two pixels to ten pixels in diameter. | |
152 | The default width of the bold pen is taken from the point size | |
153 | implied by the file name. | |
154 | The point size is not otherwise used. | |
155 | There are also fine and bold | |
156 | .IR erasers . | |
157 | .PP | |
158 | There are two locations in the window, called the | |
159 | .I cursor | |
160 | and the | |
161 | .IR mark . | |
162 | These tools are used to draw on glyphs. | |
163 | .PP | |
164 | Sometimes the cursor is on, in which case it is indicated by the | |
165 | hardware graphics cursor of the terminal, a cross. The cursor is | |
166 | considered to be located at the center of the cross. | |
167 | Sometimes the | |
168 | .I "rubber band line" | |
169 | is turned on, showing the path a line drawn would traverse. | |
170 | This line runs from the mark to the cursor, and is the only | |
171 | way the mark is graphically visible. | |
172 | .SH COMMANDS | |
173 | Commands to fed are single characters, sometimes followed by any | |
174 | needed arguments. | |
175 | The commands used by fed were chosen to be as similar to | |
176 | .IR vi (1) | |
177 | commands as was reasonable. | |
178 | Another distinction is that certain commands are in upper case. | |
179 | These commands were deliberately made hard to type because they | |
180 | cause a large change in the state of the editor and should not | |
181 | be done by accident. | |
182 | In a few cases there are both upper and lower case commands with | |
183 | the same letter. | |
184 | .PP | |
185 | .IR "Alphanumeric Keypad" : | |
186 | Note that this is the keypad on the far right. | |
187 | The graphics keypad on the near right will not work. | |
188 | These keys are each synonyms for other commands. | |
189 | They are arranged in a manner that causes the five | |
190 | arrow keys to behave sensibly, | |
191 | but the others need to be memorized or stickers | |
192 | placed on the keys. | |
193 | They are provided for convenience only, | |
194 | and the user can avoid memorization simply | |
195 | by using the mnemonic letter keys instead. | |
196 | .PP | |
197 | The layout is as follows: | |
198 | .ta 1i 2i 3i | |
199 | .nf | |
200 | undo (u) rezoom ( ) fillin (f) | |
201 | move (m) up (k) draw (d) | |
202 | left (h) base (b) right (l) | |
203 | setdot (.) down (j) cleardot (>) | |
204 | .fi | |
205 | .DT | |
206 | .PP | |
207 | The arrow keys move the cursor one pixel in the indicated direction. | |
208 | The cursor is turned on if it was off. | |
209 | Note that the alphanumeric keys (far right) must be used. | |
210 | The graphics keys (near right) will appear to move the cursor but | |
211 | it will not be moved internally. | |
212 | The cursor cannot be moved outside the current window. | |
213 | .PP | |
214 | .IR "^L" : | |
215 | Redraw the screen. This is useful if an I/O error or background | |
216 | process has caused the screen to get messed up. | |
217 | .PP | |
218 | .IR b : | |
219 | Move the cursor to the base of the window. | |
220 | This is the default location of the cursor. | |
221 | .PP | |
222 | .IR c : | |
223 | If the cursor is on, turn it off. | |
224 | Otherwise, turn it on. | |
225 | .PP | |
226 | .IR d : | |
227 | Draw a line from the mark to the cursor. | |
228 | The currently selected tool (fine pen, bold pen, fine eraser, bold eraser) | |
229 | is used. | |
230 | The cursor is turned off. | |
231 | The mark is moved to the location of the cursor. | |
232 | .PP | |
233 | .IR f : | |
234 | Fill in the current hole. | |
235 | The cursor must be in a completely enclosed empty (white) area. | |
236 | The area is set to black. | |
237 | If this command is invoked on the outside or there are any leaks | |
238 | to the outside, the entire outside will be filled in. | |
239 | (Undo is useful in this case.) | |
240 | Filling in cannot jump diagonals, | |
241 | but can rather only spread in the four orthogonal directions. | |
242 | .PP | |
243 | .IR "g <x>" : | |
244 | Get a glyph. | |
245 | X can be any character. | |
246 | The glyph corresponding to x is put in a window, and this | |
247 | window is made the current window. | |
248 | The glyph is centered horizontally in the window. | |
249 | The baseline is located at row 70 from the top of the window. | |
250 | The pen and cursor are placed at the base, | |
251 | and the cursor is turned off. | |
252 | The glyph must exist. | |
253 | .PP | |
254 | .IR h , | |
255 | .IR j , | |
256 | .IR k , | |
257 | and | |
258 | .I l | |
259 | are accepted to mean | |
260 | left, down, up, and right, respectively. | |
261 | They are synonomous with the alphanumeric arrow keys. | |
262 | They have the same meanings as in | |
263 | .IR vi(1) . | |
264 | .PP | |
265 | .IR "m" : | |
266 | Move the mark to the current location of the cursor. | |
267 | The cursor is turned on. | |
268 | .PP | |
269 | .IR "n <x>" : | |
270 | New glyph. | |
271 | This is similar to | |
272 | .IR g , | |
273 | except that the glyph must | |
274 | .I not | |
275 | exist. | |
276 | It is used to create a new glyph. | |
277 | A blank window is created, centered at (50, 70) as in g. | |
278 | .PP | |
279 | .IR p : | |
280 | Print the contents of the screen. | |
281 | An HP 2631 printer must be connected to the terminal. | |
282 | The screen is copied to the printer. | |
283 | If in inverse video mode, | |
284 | the screen is changed to normal video mode before the print, | |
285 | and then changed back after the print. | |
286 | .PP | |
287 | .IR r : | |
288 | If the rubber band line is on, turn it off. | |
289 | Otherwise, turn it on. | |
290 | .PP | |
291 | .IR "s <what> [<where>]" : | |
292 | Set <what> to <where>. | |
293 | What and where are single characters. | |
294 | The possibilities are: | |
295 | .RS | |
296 | .PP | |
297 | .IR spf : | |
298 | Set pen fine. | |
299 | (`l' for light is also accepted.) | |
300 | .PP | |
301 | .IR spb : | |
302 | set pen bold. | |
303 | (`h' for heavy is also accepted.) | |
304 | .PP | |
305 | .IR sd : | |
306 | Set draw. | |
307 | The pen is used instead of the eraser. | |
308 | .PP | |
309 | .IR se : | |
310 | Set erase. | |
311 | The eraser is used instead of the pen. | |
312 | .PP | |
313 | .IR ss<n> : | |
314 | Set size of bold pen. | |
315 | <n> is a digit from 1 to 9. | |
316 | The size of the bold pen is set accordingly. | |
317 | This also affects the bold eraser. | |
318 | .RE | |
319 | .PP | |
320 | .IR u : | |
321 | Undo. The previous change to the current window is undone. | |
322 | Note that undo is on a window by window basis, so that | |
323 | commands that affect characters or more than one window cannot be undone. | |
324 | .PP | |
325 | .IR "z <n>" : | |
326 | Zoom to level n. | |
327 | The screen is blown up by a factor of n. | |
328 | This only affects the appearance of the screen | |
329 | to make it easy to see the individual dots, | |
330 | and does not affect the size of the glyph or | |
331 | the result of a print command. | |
332 | Zooming to 1 shows the entire screen, a level of 3 or 4 | |
333 | is probably good for editing glyphs. | |
334 | When a message is printed on the screen, fed automatically | |
335 | zooms out to level 1 so you can read the message. | |
336 | Hitting space will zoom back. | |
337 | z followed by <return> zooms out without changing the previous zoom. | |
338 | .PP | |
339 | .IR space : | |
340 | Zoom back to the level most recently requested by the z command. | |
341 | .PP | |
342 | .IR "A <i/e/r> <first> <last> [<oldps> <newps>]" : | |
343 | .br | |
344 | Artificially italicize/embolden/resize a range of glyphs in the current font. | |
345 | Enter i for italicize, e for embolden, or r for resize, | |
346 | and the first and last character in the range desired. | |
347 | If you are resizing you will also have to enter the old and new point | |
348 | size, each terminated by a return. | |
349 | Each glyph is gotten and changed on the screen visibly. | |
350 | Glyphs are italicized by slanting them to the right at a slope of 1/5. | |
351 | They are emboldened by smearing them to the right a number if pixels | |
352 | equal to the current heavy pen size. | |
353 | They are resized with an algorithm which translates all on bits | |
354 | to the new position. | |
355 | These operations will be considerably faster if the | |
356 | .B \-q | |
357 | option is in effect, | |
358 | since much overhead is involved in the graphic display. | |
359 | .PP | |
360 | .IR B : | |
361 | Move the base to the cursor. | |
362 | The cursor is turned on. | |
363 | .PP | |
364 | .IR "C <from> <to>" : | |
365 | Copy the glyph in character <from> to character <to>. | |
366 | If <from> has a window on the screen, that window is | |
367 | given to <to>. | |
368 | .PP | |
369 | .IR "D <from> <through>" : | |
370 | Delete a range of characters in the font, from <from> through <through> | |
371 | inclusive. To delete a single character type it twice. | |
372 | .PP | |
373 | .IR "E <file>" : | |
374 | Edit the named file. | |
375 | If changes have been made to the current file, | |
376 | confirmation will be requested. | |
377 | (Either 'y' or 'E' is accepted.) | |
378 | The file name is terminated with return. | |
379 | .PP | |
380 | .IR "F <first> <last>" : | |
381 | Show the font on the screen. | |
382 | The characters in the specified range are shown. | |
383 | The width values are used to get natural spacing. | |
384 | The display will remain until another command is typed, | |
385 | at which time the previous display will be redrawn and | |
386 | the new command will be executed. | |
387 | As a special case, a ``p'' command will print the results | |
388 | of the ``F'' command instead of the previous display. | |
389 | .PP | |
390 | .IR "I <h/v>" : | |
391 | Invert the current glyph about a horizontal or vertical axis, | |
392 | as indicated by | |
393 | .I h | |
394 | or | |
395 | .IR v . | |
396 | The axis runs up the center of the window. | |
397 | The base can be subseqently positioned with the | |
398 | .I B | |
399 | command. | |
400 | .PP | |
401 | .IR K : | |
402 | Kill the current glyph. | |
403 | All dots are set to blank. | |
404 | The glyph is not removed from the font. | |
405 | This is used for redrawing a glyph from scratch or | |
406 | replacing it with another glyph. | |
407 | .PP | |
408 | .IR "M <from> <to>" : | |
409 | Move a glyph from <from> to <to>. | |
410 | This is just like the copy command but the original is deleted. | |
411 | .PP | |
412 | .IR "N <file>" : | |
413 | Write out the current file, if necessary, and edit the new file specified. | |
414 | The file name is terminated with return. | |
415 | .PP | |
416 | .IR "P <first> <last> <file>" : | |
417 | Partial read from a file. | |
418 | A file and the first and last characters in the range are prompted for. | |
419 | Characters not in the range are left unmodified, | |
420 | characters in the range are handled as in the R command. | |
421 | .PP | |
422 | .IR Q : | |
423 | Quit the editor, without saving any work. | |
424 | If changes have been made confirmation will be required | |
425 | (either `Q' or 'y' is taken as `yes'.) | |
426 | .PP | |
427 | .IR "R <file>" : | |
428 | Read in the named file on top of the current file. | |
429 | Glyphs are merged wherever possible. | |
430 | If there is a conflict, you will be asked whether fed should | |
431 | take the glyph from the file (f) or buffer (b). | |
432 | Responding with F or B will lock in that mode for the remainder of the read. | |
433 | The file name is terminated with a return. | |
434 | .PP | |
435 | .IR "T <text>" : | |
436 | .PP | |
437 | Typeset the line of text on the terminal. | |
438 | This is similar to the F command except that | |
439 | the given text is arranged on the screen, so | |
440 | you can see how some particular combination of characters would look. | |
441 | .PP | |
442 | .IR V : | |
443 | Toggle whether editing is being done in inverse video mode. | |
444 | .PP | |
445 | .IR "W <file>" : | |
446 | Write the buffer out onto the named file, | |
447 | which is terminated by return. | |
448 | A null file name means the current file name. | |
449 | .PP | |
450 | .IR "ZZ" : | |
451 | Exit fed. | |
452 | A write is done, if necessary, | |
453 | followed by a quit. | |
454 | This is the normal way to leave fed. | |
455 | The Z must be doubled for compatibility with | |
456 | .IR vi . | |
457 | .PP | |
458 | .IR "." : | |
459 | Turn on the dot under the cursor. | |
460 | The cursor is turned off. | |
461 | .PP | |
462 | .IR ">" : | |
463 | Turn off the dot under the cursor. | |
464 | The cursor is turned off. | |
465 | .PP | |
466 | .IR "# <char> <field> <value>" : | |
467 | Edit a numerical field. | |
468 | This only makes sense if the glyph has not been gotten | |
469 | .RI ( g | |
470 | or | |
471 | .IR n ) | |
472 | yet, | |
473 | since otherwise the values are taken from window specific things | |
474 | such as the base. | |
475 | Fed does not do any sanity checking, but just substitutes the value input. | |
476 | Fields are the first letter of any field from the dispatch structure | |
477 | (see vfont(5)), specifically, these fields are | |
478 | .IR addr , | |
479 | .IR nbytes , | |
480 | .IR left , | |
481 | .IR right , | |
482 | .IR up , | |
483 | .IR down , | |
484 | and | |
485 | .IR width . | |
486 | The number, which may be signed, is terminated by a newline. | |
487 | .SH FILES | |
488 | /usr/lib/vfont/*.* | |
489 | .SH SEE ALSO | |
490 | vfont(5), vfontinfo(1), vtroff(1), vwidth(1), rotate(1) | |
491 | .SH AUTHOR | |
492 | Mark Horton | |
493 | .SH BUGS | |
494 | Attempting to use the second 128 characters would be folly. | |
495 | Fed has never been tested on such fonts, and at a bare minimum | |
496 | there would be problems trying to input 8 bit characters. | |
497 | .PP | |
498 | The character DEL is interpreted by the tty driver to mean interrupt. | |
499 | Hence the corresponding glyph cannot be accessed. | |
500 | The | |
501 | .IR start , | |
502 | .IR stop , | |
503 | and | |
504 | .I quit | |
505 | characters are turned off, but other characters used by the | |
506 | new tty driver must be quoted with ^V. | |
507 | .PP | |
508 | Changed widths are not copied to the width table used by troff. | |
509 | This only matters if logical widths are changed, or if | |
510 | glyphs are moved around. | |
511 | For these cases, | |
512 | .I vwidth(1) | |
513 | must be used. | |
514 | .PP | |
515 | The artificial operations don't do a very good job. | |
516 | The quality possible from blowing a font up is in general poor. | |
517 | Italicizing tends to make edges that were previously slanted very ragged. | |
518 | However, these operations are better than nothing at all and are | |
519 | a reasonable first approximation for hand fixing. | |
520 | .PP | |
521 | The HP 2648 Terminal on which this runs has been stolen. |