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