Home » Archimedes archive » Archimedes World » AW-1995-01-Disc2.adf » Disk2Jan95 » !AWJan95/Goodies/Event/Docs/Fonts
!AWJan95/Goodies/Event/Docs/Fonts
This website contains an archive of files for the Acorn Electron, BBC Micro, Acorn Archimedes, Commodore 16 and Commodore 64 computers, which Dominic Ford has rescued from his private collection of floppy disks and cassettes.
Some of these files were originally commercial releases in the 1980s and 1990s, but they are now widely available online. I assume that copyright over them is no longer being asserted. If you own the copyright and would like files to be removed, please contact me.
Tape/disk: | Home » Archimedes archive » Archimedes World » AW-1995-01-Disc2.adf » Disk2Jan95 |
Filename: | !AWJan95/Goodies/Event/Docs/Fonts |
Read OK: | ✔ |
File size: | 0A00 bytes |
Load address: | 0000 |
Exec address: | 0000 |
File contents
PROCshell_FontGetHandle() Params => str font name real height of font (in points) real width of font (in points) This routine returns a handle for the specified font at the given size. It also causes the font to be cached for later use. Taken from BLibII library 'Draw' by Tom Hughes. -------------------------------------------------------- PROCshell_FontForgetFont() Params => str font handle This routine should be called when a program has finished with a font. It tells the font manager that it may uncache the font if it wishes, as it is no longer being used. Taken from BLibII library 'Draw' by Tom Hughes. -------------------------------------------------------- PROCshell_FontSetColour() Params => int foreground colour int background colour This procedure sets the colours used for plotting outline fonts. Each of the specified colours is given as a word of the form &BBRRGG00. Taken from BLibII library 'Draw' by Tom Hughes. -------------------------------------------------------- PROCshell_AttachFontSubMenu() Params => int item handle str function to call when menu_warning message is received (optional, may be "") This routine will attempt to load the necessary 'FontMenu' support module if it is not already loaded. It expects to find it in the EvntShellSystem$Path (usually in !ShellSys). User FN (PROCshell_AttachFontSubMenu) Params => int window handle int icon handle <= int junk This function can be used to set the currently selected font in the menu about to be opened. Use PROCshell_FontMenuSelectFont to do this. -------------------------------------------------------- FNshell_FontMenuGetLastSelectedFont Params => None <= str font name (could be "") This routine should be used in the function called when a menu_select event has occurred to discover if font menu selection has been made, and if so the name of the font. If no valid font menu selection has been made the function will return "" and no action should be taken. -------------------------------------------------------- PROCshell_FontMenuSelectFont() Params => str name of font to select The font name is used by the library routines to decide which font name to select when the font menu opens. As the same font menu can be used by different applications it is important to set this up just before the menu opens. --------------------------------------------------------
00000000 50 52 4f 43 73 68 65 6c 6c 5f 46 6f 6e 74 47 65 |PROCshell_FontGe| 00000010 74 48 61 6e 64 6c 65 28 29 0a 50 61 72 61 6d 73 |tHandle().Params| 00000020 20 3d 3e 0a 20 20 20 20 20 20 20 20 20 73 74 72 | =>. str| 00000030 20 20 66 6f 6e 74 20 6e 61 6d 65 0a 20 20 20 20 | font name. | 00000040 20 20 20 20 20 72 65 61 6c 20 68 65 69 67 68 74 | real height| 00000050 20 6f 66 20 66 6f 6e 74 20 28 69 6e 20 70 6f 69 | of font (in poi| 00000060 6e 74 73 29 0a 20 20 20 20 20 20 20 20 20 72 65 |nts). re| 00000070 61 6c 20 77 69 64 74 68 20 20 6f 66 20 66 6f 6e |al width of fon| 00000080 74 20 28 69 6e 20 70 6f 69 6e 74 73 29 0a 0a 54 |t (in points)..T| 00000090 68 69 73 20 72 6f 75 74 69 6e 65 20 72 65 74 75 |his routine retu| 000000a0 72 6e 73 20 61 20 68 61 6e 64 6c 65 20 66 6f 72 |rns a handle for| 000000b0 20 74 68 65 20 73 70 65 63 69 66 69 65 64 0a 66 | the specified.f| 000000c0 6f 6e 74 20 61 74 20 74 68 65 20 67 69 76 65 6e |ont at the given| 000000d0 20 73 69 7a 65 2e 20 49 74 20 61 6c 73 6f 20 63 | size. It also c| 000000e0 61 75 73 65 73 20 74 68 65 20 66 6f 6e 74 0a 74 |auses the font.t| 000000f0 6f 20 62 65 20 63 61 63 68 65 64 20 66 6f 72 20 |o be cached for | 00000100 6c 61 74 65 72 20 75 73 65 2e 0a 0a 54 61 6b 65 |later use...Take| 00000110 6e 20 66 72 6f 6d 20 42 4c 69 62 49 49 20 6c 69 |n from BLibII li| 00000120 62 72 61 72 79 20 27 44 72 61 77 27 20 62 79 20 |brary 'Draw' by | 00000130 54 6f 6d 20 48 75 67 68 65 73 2e 0a 0a 2d 2d 2d |Tom Hughes...---| 00000140 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d |----------------| * 00000170 2d 2d 2d 2d 2d 0a 0a 50 52 4f 43 73 68 65 6c 6c |-----..PROCshell| 00000180 5f 46 6f 6e 74 46 6f 72 67 65 74 46 6f 6e 74 28 |_FontForgetFont(| 00000190 29 0a 50 61 72 61 6d 73 20 3d 3e 0a 20 20 20 20 |).Params =>. | 000001a0 20 20 20 20 20 73 74 72 20 20 66 6f 6e 74 20 68 | str font h| 000001b0 61 6e 64 6c 65 0a 0a 54 68 69 73 20 72 6f 75 74 |andle..This rout| 000001c0 69 6e 65 20 73 68 6f 75 6c 64 20 62 65 20 63 61 |ine should be ca| 000001d0 6c 6c 65 64 20 77 68 65 6e 20 61 20 70 72 6f 67 |lled when a prog| 000001e0 72 61 6d 0a 68 61 73 20 66 69 6e 69 73 68 65 64 |ram.has finished| 000001f0 20 77 69 74 68 20 61 20 66 6f 6e 74 2e 20 49 74 | with a font. It| 00000200 20 74 65 6c 6c 73 20 74 68 65 20 66 6f 6e 74 0a | tells the font.| 00000210 6d 61 6e 61 67 65 72 20 74 68 61 74 20 69 74 20 |manager that it | 00000220 6d 61 79 20 75 6e 63 61 63 68 65 20 74 68 65 20 |may uncache the | 00000230 66 6f 6e 74 20 69 66 20 69 74 0a 77 69 73 68 65 |font if it.wishe| 00000240 73 2c 20 61 73 20 69 74 20 69 73 20 6e 6f 20 6c |s, as it is no l| 00000250 6f 6e 67 65 72 20 62 65 69 6e 67 20 75 73 65 64 |onger being used| 00000260 2e 0a 0a 54 61 6b 65 6e 20 66 72 6f 6d 20 42 4c |...Taken from BL| 00000270 69 62 49 49 20 6c 69 62 72 61 72 79 20 27 44 72 |ibII library 'Dr| 00000280 61 77 27 20 62 79 20 54 6f 6d 20 48 75 67 68 65 |aw' by Tom Hughe| 00000290 73 2e 0a 0a 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d |s...------------| 000002a0 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d |----------------| * 000002c0 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 0a 0a 50 52 |------------..PR| 000002d0 4f 43 73 68 65 6c 6c 5f 46 6f 6e 74 53 65 74 43 |OCshell_FontSetC| 000002e0 6f 6c 6f 75 72 28 29 0a 50 61 72 61 6d 73 20 3d |olour().Params =| 000002f0 3e 0a 20 20 20 20 20 20 20 20 20 69 6e 74 20 66 |>. int f| 00000300 6f 72 65 67 72 6f 75 6e 64 20 63 6f 6c 6f 75 72 |oreground colour| 00000310 0a 20 20 20 20 20 20 20 20 20 69 6e 74 20 62 61 |. int ba| 00000320 63 6b 67 72 6f 75 6e 64 20 63 6f 6c 6f 75 72 0a |ckground colour.| 00000330 0a 54 68 69 73 20 70 72 6f 63 65 64 75 72 65 20 |.This procedure | 00000340 73 65 74 73 20 74 68 65 20 63 6f 6c 6f 75 72 73 |sets the colours| 00000350 20 75 73 65 64 20 66 6f 72 0a 70 6c 6f 74 74 69 | used for.plotti| 00000360 6e 67 20 6f 75 74 6c 69 6e 65 20 66 6f 6e 74 73 |ng outline fonts| 00000370 2e 20 45 61 63 68 20 6f 66 20 74 68 65 0a 73 70 |. Each of the.sp| 00000380 65 63 69 66 69 65 64 20 63 6f 6c 6f 75 72 73 20 |ecified colours | 00000390 69 73 20 67 69 76 65 6e 20 61 73 20 61 20 77 6f |is given as a wo| 000003a0 72 64 20 6f 66 0a 74 68 65 20 66 6f 72 6d 20 26 |rd of.the form &| 000003b0 42 42 52 52 47 47 30 30 2e 20 0a 0a 54 61 6b 65 |BBRRGG00. ..Take| 000003c0 6e 20 66 72 6f 6d 20 42 4c 69 62 49 49 20 6c 69 |n from BLibII li| 000003d0 62 72 61 72 79 20 27 44 72 61 77 27 20 62 79 20 |brary 'Draw' by | 000003e0 54 6f 6d 20 48 75 67 68 65 73 2e 0a 0a 0a 2d 2d |Tom Hughes....--| 000003f0 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d |----------------| * 00000420 2d 2d 2d 2d 2d 2d 0a 0a 50 52 4f 43 73 68 65 6c |------..PROCshel| 00000430 6c 5f 41 74 74 61 63 68 46 6f 6e 74 53 75 62 4d |l_AttachFontSubM| 00000440 65 6e 75 28 29 0a 50 61 72 61 6d 73 20 3d 3e 0a |enu().Params =>.| 00000450 20 20 20 20 20 20 20 20 20 69 6e 74 20 69 74 65 | int ite| 00000460 6d 20 68 61 6e 64 6c 65 0a 20 20 20 20 20 20 20 |m handle. | 00000470 20 20 73 74 72 20 66 75 6e 63 74 69 6f 6e 20 74 | str function t| 00000480 6f 20 63 61 6c 6c 20 77 68 65 6e 20 6d 65 6e 75 |o call when menu| 00000490 5f 77 61 72 6e 69 6e 67 0a 20 20 20 20 20 20 20 |_warning. | 000004a0 20 20 20 20 20 20 6d 65 73 73 61 67 65 20 69 73 | message is| 000004b0 20 72 65 63 65 69 76 65 64 20 28 6f 70 74 69 6f | received (optio| 000004c0 6e 61 6c 2c 20 6d 61 79 0a 20 20 20 20 20 20 20 |nal, may. | 000004d0 20 20 20 20 20 20 62 65 20 22 22 29 0a 0a 54 68 | be "")..Th| 000004e0 69 73 20 72 6f 75 74 69 6e 65 20 77 69 6c 6c 20 |is routine will | 000004f0 61 74 74 65 6d 70 74 20 74 6f 20 6c 6f 61 64 20 |attempt to load | 00000500 74 68 65 20 6e 65 63 65 73 73 61 72 79 0a 27 46 |the necessary.'F| 00000510 6f 6e 74 4d 65 6e 75 27 20 73 75 70 70 6f 72 74 |ontMenu' support| 00000520 20 6d 6f 64 75 6c 65 20 69 66 20 69 74 20 69 73 | module if it is| 00000530 20 6e 6f 74 20 61 6c 72 65 61 64 79 0a 6c 6f 61 | not already.loa| 00000540 64 65 64 2e 20 49 74 20 65 78 70 65 63 74 73 20 |ded. It expects | 00000550 74 6f 20 66 69 6e 64 20 69 74 20 69 6e 20 74 68 |to find it in th| 00000560 65 0a 45 76 6e 74 53 68 65 6c 6c 53 79 73 74 65 |e.EvntShellSyste| 00000570 6d 24 50 61 74 68 20 28 75 73 75 61 6c 6c 79 20 |m$Path (usually | 00000580 69 6e 20 21 53 68 65 6c 6c 53 79 73 29 2e 0a 0a |in !ShellSys)...| 00000590 55 73 65 72 20 46 4e 20 28 50 52 4f 43 73 68 65 |User FN (PROCshe| 000005a0 6c 6c 5f 41 74 74 61 63 68 46 6f 6e 74 53 75 62 |ll_AttachFontSub| 000005b0 4d 65 6e 75 29 20 0a 50 61 72 61 6d 73 20 3d 3e |Menu) .Params =>| 000005c0 20 0a 20 20 20 20 20 20 20 20 20 69 6e 74 20 77 | . int w| 000005d0 69 6e 64 6f 77 20 68 61 6e 64 6c 65 0a 20 20 20 |indow handle. | 000005e0 20 20 20 20 20 20 69 6e 74 20 69 63 6f 6e 20 68 | int icon h| 000005f0 61 6e 64 6c 65 0a 0a 20 20 20 20 20 20 20 3c 3d |andle.. <=| 00000600 0a 20 20 20 20 20 20 20 20 20 69 6e 74 20 6a 75 |. int ju| 00000610 6e 6b 0a 0a 54 68 69 73 20 66 75 6e 63 74 69 6f |nk..This functio| 00000620 6e 20 63 61 6e 20 62 65 20 75 73 65 64 20 74 6f |n can be used to| 00000630 20 73 65 74 20 74 68 65 20 63 75 72 72 65 6e 74 | set the current| 00000640 6c 79 0a 73 65 6c 65 63 74 65 64 20 66 6f 6e 74 |ly.selected font| 00000650 20 69 6e 20 74 68 65 20 6d 65 6e 75 20 61 62 6f | in the menu abo| 00000660 75 74 20 74 6f 20 62 65 20 6f 70 65 6e 65 64 2e |ut to be opened.| 00000670 0a 55 73 65 20 50 52 4f 43 73 68 65 6c 6c 5f 46 |.Use PROCshell_F| 00000680 6f 6e 74 4d 65 6e 75 53 65 6c 65 63 74 46 6f 6e |ontMenuSelectFon| 00000690 74 20 74 6f 20 64 6f 20 74 68 69 73 2e 0a 0a 2d |t to do this...-| 000006a0 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d |----------------| * 000006d0 2d 2d 2d 2d 2d 2d 2d 0a 0a 46 4e 73 68 65 6c 6c |-------..FNshell| 000006e0 5f 46 6f 6e 74 4d 65 6e 75 47 65 74 4c 61 73 74 |_FontMenuGetLast| 000006f0 53 65 6c 65 63 74 65 64 46 6f 6e 74 0a 50 61 72 |SelectedFont.Par| 00000700 61 6d 73 20 3d 3e 0a 20 20 20 20 20 20 20 20 20 |ams =>. | 00000710 4e 6f 6e 65 0a 0a 20 20 20 20 20 20 20 3c 3d 0a |None.. <=.| 00000720 20 20 20 20 20 20 20 20 20 73 74 72 20 66 6f 6e | str fon| 00000730 74 20 6e 61 6d 65 20 28 63 6f 75 6c 64 20 62 65 |t name (could be| 00000740 20 22 22 29 0a 0a 54 68 69 73 20 72 6f 75 74 69 | "")..This routi| 00000750 6e 65 20 73 68 6f 75 6c 64 20 62 65 20 75 73 65 |ne should be use| 00000760 64 20 69 6e 20 74 68 65 20 66 75 6e 63 74 69 6f |d in the functio| 00000770 6e 0a 63 61 6c 6c 65 64 20 77 68 65 6e 20 61 20 |n.called when a | 00000780 6d 65 6e 75 5f 73 65 6c 65 63 74 20 65 76 65 6e |menu_select even| 00000790 74 20 68 61 73 20 6f 63 63 75 72 72 65 64 20 74 |t has occurred t| 000007a0 6f 0a 64 69 73 63 6f 76 65 72 20 69 66 20 66 6f |o.discover if fo| 000007b0 6e 74 20 6d 65 6e 75 20 73 65 6c 65 63 74 69 6f |nt menu selectio| 000007c0 6e 20 68 61 73 20 62 65 65 6e 20 6d 61 64 65 2c |n has been made,| 000007d0 0a 61 6e 64 20 69 66 20 73 6f 20 74 68 65 20 6e |.and if so the n| 000007e0 61 6d 65 20 6f 66 20 74 68 65 20 66 6f 6e 74 2e |ame of the font.| 000007f0 0a 0a 49 66 20 6e 6f 20 76 61 6c 69 64 20 66 6f |..If no valid fo| 00000800 6e 74 20 6d 65 6e 75 20 73 65 6c 65 63 74 69 6f |nt menu selectio| 00000810 6e 20 68 61 73 20 62 65 65 6e 20 6d 61 64 65 0a |n has been made.| 00000820 74 68 65 20 66 75 6e 63 74 69 6f 6e 20 77 69 6c |the function wil| 00000830 6c 20 72 65 74 75 72 6e 20 22 22 20 61 6e 64 20 |l return "" and | 00000840 6e 6f 20 61 63 74 69 6f 6e 20 73 68 6f 75 6c 64 |no action should| 00000850 0a 62 65 20 74 61 6b 65 6e 2e 0a 0a 2d 2d 2d 2d |.be taken...----| 00000860 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d |----------------| * 00000890 2d 2d 2d 2d 0a 0a 50 52 4f 43 73 68 65 6c 6c 5f |----..PROCshell_| 000008a0 46 6f 6e 74 4d 65 6e 75 53 65 6c 65 63 74 46 6f |FontMenuSelectFo| 000008b0 6e 74 28 29 0a 50 61 72 61 6d 73 20 3d 3e 0a 20 |nt().Params =>. | 000008c0 20 20 20 20 20 20 20 20 73 74 72 20 6e 61 6d 65 | str name| 000008d0 20 6f 66 20 66 6f 6e 74 20 74 6f 20 73 65 6c 65 | of font to sele| 000008e0 63 74 0a 0a 54 68 65 20 66 6f 6e 74 20 6e 61 6d |ct..The font nam| 000008f0 65 20 69 73 20 75 73 65 64 20 62 79 20 74 68 65 |e is used by the| 00000900 20 6c 69 62 72 61 72 79 20 72 6f 75 74 69 6e 65 | library routine| 00000910 73 0a 74 6f 20 64 65 63 69 64 65 20 77 68 69 63 |s.to decide whic| 00000920 68 20 66 6f 6e 74 20 6e 61 6d 65 20 74 6f 20 73 |h font name to s| 00000930 65 6c 65 63 74 20 77 68 65 6e 20 74 68 65 0a 66 |elect when the.f| 00000940 6f 6e 74 20 6d 65 6e 75 20 6f 70 65 6e 73 2e 20 |ont menu opens. | 00000950 41 73 20 74 68 65 20 73 61 6d 65 20 66 6f 6e 74 |As the same font| 00000960 20 6d 65 6e 75 20 63 61 6e 20 62 65 0a 75 73 65 | menu can be.use| 00000970 64 20 62 79 20 64 69 66 66 65 72 65 6e 74 20 61 |d by different a| 00000980 70 70 6c 69 63 61 74 69 6f 6e 73 20 69 74 20 69 |pplications it i| 00000990 73 20 69 6d 70 6f 72 74 61 6e 74 0a 74 6f 20 73 |s important.to s| 000009a0 65 74 20 74 68 69 73 20 75 70 20 6a 75 73 74 20 |et this up just | 000009b0 62 65 66 6f 72 65 20 74 68 65 20 6d 65 6e 75 20 |before the menu | 000009c0 6f 70 65 6e 73 2e 0a 0a 2d 2d 2d 2d 2d 2d 2d 2d |opens...--------| 000009d0 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d |----------------| * 00000a00