XEROX EDITFONT 2 4 1 EDITFONT 1 4 By: Kelly Roach (Roach.pa@Xerox.com) EDITFONT allows the user to create, edit, and install your very own DISPLAY fonts. AN EXAMPLE OF HOW TO CREATE YOUR OWN FONT (* Do this after LOADing EDITFONT.DCOM. *) (SETQ MYFONT (COPYFONT (FONTCREATE 'GACHA 10))) (EDITFONT MYFONT) (WRITESTRIKEFONTFILE MYFONT NIL '{SERVER}MYFONT10-C0.DISPLAYFONT) (* Put this in your init file. *) (ADDTOVAR DISPLAYFONTDIRECTORIES {SERVER}) (* In some other session when you want to recreate your font and DISPLAYFONTDIRECTORIES now has {SERVER} on FONTCREATE's search path, do this. *) (SETQ MYFONT (FONTCREATE 'MYFONT 10 'MRR)) You can vary "MYFONT", "GACHA", "10", "SERVER", and "MYDIRECTORY" to suit your needs. AN EXAMPLE OF HOW TO EDIT A BUILT IN SYSTEM FONT Editing already existing fonts directly is troublesome. A window caches parts of its DSPFONT. If you edit a font, new parts get stuck into the font, but not into the windows. To create your own GACHA10 requires a little bit of indirection. The following recipe will work. (* Do this after LOADing EDITFONT.DCOM. *) (SETQ MYFONT (COPYFONT (FONTCREATE 'GACHA 10))) (EDITFONT MYFONT) (WRITESTRIKEFONTFILE MYFONT NIL '{SERVER}GACHA10-C0.DISPLAYFONT) (* Put this in your init file. You'll need to discover which variables and windows in the system are already initialized with the built in system font, before your init file gets its hands on it. Your init file should then reset those globals and DSPFONT those windows. *) (ADDTOVAR DISPLAYFONTDIRECTORIES {SERVER}) (SETFONTDESCRIPTOR 'GACHA 10 'MRR 0 'DISPLAY NIL) (SETQ MYFONT (FONTCREATE 'GACHA 10 'MRR)) (FOR VAR IN AFFECTEDFONTVARS DO (SET VAR MYFONT)) (FOR WINDOW IN AFFECTEDWINDOWS DO (DSPFONT MYFONT AFFECTEDWINDOWS)) You can vary "MYFONT", "GACHA", "10", "SERVER", and "MYDIRECTORY" to suit your needs. (EDITFONT FONT FROMCHARCODE TOCHARCODE) [Function] FROMCHARCODE and TOCHARCODE are optional, defaulting to 0 and 255 repectively. FONT can be any DISPLAY FONTDESCRIPTOR. You will be presented with a menu of character bitmaps. Buttoning a character bitmap with the LEFT mouse button will call EDITBM on that character bitmap. Buttoning a character bitmap with the MIDDLE mouse button pops up a menu that allows the user to NEWDESCENT the character, DELETE the character (make selected character be an unspecified character), EDITBM the character, or REPLACE the character with a new bitmap. Characters without bitmaps will print using the bitmap of character 256 which is the dummy character, used as a default for unspecified characters. Generally, the dummy character is a black rectangle. Editing any character any character other than 256 makes that character be specified. Buttoning DELETE makes a character be unspecified. DELETE is used to delete characters from FONT, so that FONT takes up less space when stored as a STRIKE font file. You may notice that if you edit the character 256, you change the appearance of all the unspecified characters in the menu besides the appearance of character 256. An NS font consists of 256 character sets of 256 characters. You can use 0 <= FROMCHARCODE < TOCHARCODE <= 65535 to get at all characters in an NS font. (COPYFONT FONT) [Function] COPYFONT returns a new font that is a copy of FONT. The font copy returned by COPYFONT shares no structure with the original FONT and so can be editted without having side effects to FONT. (BLANKFONTCREATE FAMILY SIZE FACE FIRSTCHAR LASTCHAR ASCENT DESCENT WIDTH [Function] This function will create a blank fontdescriptor for the user. All the characters in the result will be blank until you edit them with EDITFONT. Character codes not between FIRSTCHAR and LASTCHAR are left unspecified. WIDTH may be a number, causing WIDTH to be the width of every character or WIDTH may be a list of (IPLUS LASTCHAR (IMINUS FIRSTCHAR) 2) numbers, determining the width for each specified char plus the dummy char. Another good way to get a fresh font is to use COPYFONT with some already existing fontdescriptor. (READSTRIKEFONTFILE FAMILY SIZE FACE FILE FONT CHARSET) [Function] FONT and CHARSET are optional. Reads a STRIKE font file FILE, returning a fontdescriptor. The contents of FILE will become character set CHARSET of FONT if you supply a CHARSET number between 0 and 255 and a fontdescriptor FONT. Generally, you'll want to use FONTCREATE instead to read your fonts back in. (WRITESTRIKEFONTFILE FONT CHARSET FILE) [Function] CHARSET is optional and defaults to 0. WRITESTRIKEFONTFILE writes FONT out as a STRIKE font file FILE. This is the way to store your fonts. FILE can be read back in with READSTRIKEFONTFILE or FONTCREATE. FONTCREATE will be able to find your files on {SERVER} if you do (ADDTOVAR DISPLAYFONTDIRECTORIES {SERVER}) in your init file. WRITESTRIKEFONTFILE will write out character set CHARSET of FONT if you supply a CHARSET number between 0 and 255. Comments and bugs can be sent to ROACH.PA. (LIST ((PAGE NIL (PAPERSIZE Letter FOLIOINFO (ARABIC) STARTINGPAGE# 1) (0 0 612 792) ((FOLIO NIL (PARALOOKS (QUAD CENTERED) CHARLOOKS (SUPERSCRIPT 0 INVISIBLE OFF SELECTPOINT OFF PROTECTED OFF SIZE 10 FAMILY MODERN OVERLINE OFF STRIKEOUT OFF UNDERLINE OFF EXPANSION REGULAR SLOPE REGULAR WEIGHT MEDIUM INVERTED OFF USERINFO NIL STYLE NIL) FORMATINFO (ARABIC)) (174 36 288 36) NIL) (HEADING NIL (HEADINGTYPE RUNNINGHEAD) (84 744 528 36) NIL) (TEXT NIL NIL (84 96 456 600) NIL))) (PAGE NIL (PAPERSIZE Letter FOLIOINFO (ARABIC)) (0 0 612 792) ((FOLIO NIL (PARALOOKS (QUAD CENTERED) CHARLOOKS (SUPERSCRIPT 0 INVISIBLE OFF SELECTPOINT OFF PROTECTED OFF SIZE 10 FAMILY MODERN OVERLINE OFF STRIKEOUT OFF UNDERLINE OFF EXPANSION REGULAR SLOPE REGULAR WEIGHT MEDIUM INVERTED OFF USERINFO NIL STYLE NIL) FORMATINFO (ARABIC)) (174 36 288 36) NIL) (HEADING NIL (HEADINGTYPE RUNNINGHEAD) (84 744 528 36) NIL) (TEXT NIL NIL (84 96 456 600) NIL))) (PAGE NIL (PAPERSIZE Letter FOLIOINFO (ARABIC)) (0 0 612 792) ((FOLIO NIL (PARALOOKS (QUAD CENTERED) CHARLOOKS (SUPERSCRIPT 0 INVISIBLE OFF SELECTPOINT OFF PROTECTED OFF SIZE 10 FAMILY MODERN OVERLINE OFF STRIKEOUT OFF UNDERLINE OFF EXPANSION REGULAR SLOPE REGULAR WEIGHT MEDIUM INVERTED OFF USERINFO NIL STYLE NIL) FORMATINFO (ARABIC)) (174 36 288 36) NIL) (HEADING NIL (HEADINGTYPE RUNNINGHEAD) (84 744 528 36) NIL) (TEXT NIL NIL (84 96 456 600) NIL)))))(È(ŠŠ8(ŠŠ8DÈÈ PAGEHEADING RUNNINGHEAD(È(È MODERNLOGOMODERN MODERN TERMINAL MODERN   HRULE.GETFNMODERN  HRULE.GETFNMODERN  HRULE.GETFNMODERN   HRULE.GETFNMODERN  HRULE.GETFNMODERN &S+38(8*@ED43V138(7@ABBB@:2%'.V5)#¾JE5:ß+Þuzº