home *** CD-ROM | disk | FTP | other *** search
/ Archive Magazine 1996 / ARCHIVE_96.iso / discs / mag_discs / volume_6 / issue_06 / riscos_3 / !DeskFonts / ReadMe2 < prev    next >
Text File  |  1993-01-22  |  9KB  |  224 lines

  1.  
  2. About DeskFonts
  3. ---------------
  4.  
  5. Deskfonts is a utility which replaces the default system font with an outline
  6. font of your choice in the desktop and wherever else VDU5 type text is used.
  7.  
  8. Technical details about how Deskfonts works and some of the un-avoidable
  9. problems involved are given at the end of this document. What follows is a
  10. description of the DeskFonts multi-tasking frontend which is all that most
  11. people will see.
  12.  
  13. Load !DeskFonts in the usual way, by double clicking on it's icon. The
  14. program will install on the icon bar and clicking on this icon opens the
  15. main window. From top down, the functions which are then available are as
  16. follows:
  17.  
  18. Click on the option switch at the extreme top-left to toggle between the
  19. normal system font and the anti-aliased font. When this switch is on, the
  20. anti-aliased font will be used. Choose a anti-aliased font from the menu of
  21. available fonts. This menu may be opened by clicking on the icon called
  22. 'Fonts...' or by clicking MENU anywhere within the window. When choosing a
  23. font, it is important to note that proportional fonts (which make up the vast
  24. majority of outline fonts available) can cause problems. See below for
  25. details.
  26.  
  27. The 'Disable during errors' switch, when on, disables Deskfonts whenever an
  28. Operating system error box is about to open and re-enables the program when
  29. the box closes. This has the effect of making all the text that appears
  30. within the error box show up in the system font but is safer, if the error
  31. was generated within Deskfonts (eg a corrupted font) and this switch is off
  32. then the text displayed within the error box could, itself cause an error
  33. which would lead to an infinate loop...and the reset button!
  34.  
  35. The Size X and Size Y options allow you to change the size of the text in
  36. (surprise surprise !) the horizontal and vertical directions. Some restraint
  37. is necessary when altering the sizes. To change a size, either use the left
  38. and right arrow icons (1/4 point change or 1 point with SHIFT held down),
  39. or, enter a value into the writable size icon and press RETURN.
  40.  
  41. In Corpus, the maximum sizes that can reasonably be used are - XSize 10.75,
  42. Ysize 16.5
  43.  
  44. The Offset X size should normally be zero. Small values (eg 1 or 2) can be
  45. useful sometimes, but larger values almost always cause a mess. The value
  46. is os-units extra before each string.
  47.  
  48. The Offset Y size should normally be about 22. You may have to alter this if
  49. using a unusual text size, either increasing or decreasing it for larger and
  50. smaller y text sizes.
  51.  
  52. The Settings box allows you to save, re-load and reset all of the above
  53. settings. Saved settings are automatically re-loaded with the program so you
  54. can 'tune' deskfonts to suit your preference and then save these settings.
  55.  
  56. The Reset box (made large deliberately) is used in a 'panic' situation. Eg.
  57. you've chosen a font width of 0.001 points and you can't read anything! It
  58. resets all of the values to defaults and also resets the display to the
  59. system font.
  60.  
  61. The Icon bar menu
  62. -----------------
  63.  
  64. Fairly standard except that 'Quit' has a sub-menu. Choosing 'Quit>Complete'
  65. or just 'Quit' removes DeskFonts entirely and resets to the system font.
  66. Choosing 'Quit>Partial' leaves the DeskFonts module active, displaying the
  67. last settings you chose.
  68.  
  69.  
  70. Technical notes
  71. ---------------
  72.  
  73. Problems
  74. --------
  75.  
  76. Proportionally spaced fonts cause problems when used in place of the system
  77. font. In particular -
  78.  
  79. Text which is normally centred (eg in an icon) almost never is. The caret
  80. does not appear in the correct place within writable icons. Text which
  81. contains a great number of wide characters (eg uppercase W in most fonts)
  82. can overlap the edges of the icon it's supposed to be within.
  83.  
  84. There is a known problem with the window manager call which produces the
  85. standard 'Wimp-Report' error box. Sometimes, for no apparent reason the text
  86. is printed in vdu 4 mode at the top of the screen rather than in the error
  87. window. To follow Acorn guidelines correctly, DeskFonts should remove itself
  88. (ie restore the system font) before an error window opens and relink after
  89. the window closes. However this would make all of the text in such a window
  90. appear in the system font. As many programmers (myself included) use
  91. Wimp_ReportError for message dialogs and queries, this would make DeskFonts
  92. substantially useless. I will continue to work on this problem and may
  93. produce an update in the future.
  94.  
  95. UPDATE: Option added to disable deskfonts during the display of an error
  96. box. When on, the default system font is used within Wimp_Error dialogs,
  97. outline font restored afterwards.
  98.  
  99. Text display is (naturally) quite a lot slower than with the normal system
  100. font.
  101.  
  102. Text plotted when the plot option set to other than normal (EOR, AND OR
  103. etc.) goes wrong. (Eg adding text to a sprite in !Paint). The only solution
  104. at the moment is to disable DeskFonts.
  105.  
  106. There is a problem when text output is re-directed to a sprite (!Alarm is a
  107. particulary bad example). I don't currently know if there is a way of
  108. finding out if VDU output has been re-directed.
  109.  
  110. Those programs which use the up arrow symbol in menus to denote the use of
  111. the SHIFT key will not display the arrow symbol unless the font currently
  112. being used contains the correct symbol at the correct place. Currently none
  113. of the fonts available do so.
  114. The characters which need re-defining are -
  115.  
  116. &80 tick
  117. &81 (from large to small icon)
  118. &82 (from small to large icon)
  119. &83 re-size window icon
  120. &84 close window icon (x)
  121. &85 move to back icon
  122. &88 left arrow
  123. &89 right arrow
  124. &8A down arrow
  125. &8B up arrow (this normally is the only one needed for RISC-OS 3 users)
  126.  
  127. I have roughly defined a variant on Corpus.Bold to include these characters.
  128. Note that these definitions are VERY crude. Someone else is sure to do
  129. something better. If they do then how about sending me a copy? Also, if you
  130. are good at that sort of thing, how about defining a new monospaced outline
  131. font for the desktop that looks better than Corpus? I've got the MDA fonts
  132. that come with the PC emulator and they look even worse than Corpus.
  133.  
  134. How DeskFonts works
  135. -------------------
  136.  
  137. The low level Relocatable module intercepts all calls to the operating
  138. systems' Write character routine and re-directs the character to be printed
  139. to the fontmanager. This is complicated by the fact that many calls to
  140. OS_WriteC are NOT printable characters but moves, draws, colour changes etc.
  141. The inital code can often seem to be followed by a normal ASCII character
  142. but it MUST NOT be caught. The program gets round this by counting a
  143. specific number of characters through after the reciept of such a VDU code.
  144.  
  145. It also has to check for two special cases even when it thinks that it's
  146. recieved a normal character.
  147.  
  148. The first is when the computer is in VDU4 mode (ie when the user's pressed
  149. f12). Such characters must be passed along to the standard OS_WriteC
  150.  
  151. The second is to check that VDU output has not been re-directed via a
  152. mechinism known as VDUX_V which is used by the WindowManager to provide
  153. anti-aliased text in an icon in the desktop.
  154.  
  155. Characters which are to be printed are stored in a buffer until a control
  156. character is found. At this point the current graphics cursor position is
  157. found the background colour of the area in which the text needs updating
  158. found, and the string printed.
  159.  
  160. The program also has to check for and respond to Service calls to do with
  161. mode changes, so that the font can be recomputed correctly.
  162.  
  163. The program also hooks on to the ColourTrans vector and looks for calls to
  164. ColourTrans_SetGCOL. When one is detected the colour value is stored away
  165. and this colour is the one used for the foreground of the anti-aliased text.
  166.                                
  167.  
  168. Star commands
  169. -------------
  170.  
  171. All of the features of DeskFonts are provided by the DeskFonts relocatable
  172. module. This module interfaces to the desktop via a number of star commands.
  173. Short notes on these are given below. Similar help can be provided by
  174. pressing f12 after DeskFonts has loaded and typing *Help DeskFonts
  175.  
  176.  
  177. ==> Help on keyword DeskFonts
  178. Module is: Desk fonts      1.05 (25 Feb 1992) ⌐ Rob Davison 1992
  179.  
  180. Commands provided:
  181. DFontON DFontOFF        DFont   DFontX  DFontY  DfontOffset     DfontAlias     
  182. DFontAddx DfontOS DfontReset
  183.  
  184.  
  185. ==> Help on keyword DFontON
  186. *DFontON intercepts future calls to OS_WriteC and prints subsequent text in
  187. an anti-aliased font. Syntax: *DfontON
  188.  
  189. ==> Help on keyword DFontOFF
  190. *DFontOFF restores the default system font.
  191. Syntax: *DfontOFF
  192.  
  193. ==> Help on keyword DFont
  194. *DFont sets the font to be used in the desktop after a *DFontON.
  195. Syntax: *DFont <FontName>
  196.  
  197. ==> Help on keyword DFontX
  198. *DFontX sets the width of anti-aliased text in the desktop.
  199. Syntax: *DFontX <pointsize*16>
  200.  
  201. ==> Help on keyword DFontY
  202. *DFontY sets the height of anti-aliased text in the desktop.
  203. Syntax: *DFontY <pointsize*16>
  204.  
  205. ==> Help on keyword DfontOffset
  206. *DFontOffset sets the vertical offset of the anti-aliased text from the
  207. normal text position. Syntax: *DFontOffset <os-units>
  208.  
  209. ==> Help on keyword DfontAlias
  210. *DfontAlias controls DeskFonts colour checking.
  211. Syntax: *DFontAlias 0|1|2
  212.  
  213. ==> Help on keyword DFontAddx
  214. *DfontAddx sets the horizontal pixel offset between each character.
  215. Syntax: *DfontAddx <os-units>
  216.  
  217. ==> Help on keyword DfontOS
  218. *DFontOS allows DeskFonts to cater for different versions of RISC-OS.
  219. Syntax: *DFontOS 2|3
  220.  
  221. ==> Help on keyword DfontReset
  222. *DFontReset resets all of DeskFonts internal values to sensible defaults.
  223. Syntax: *DFontReset
  224.