home *** CD-ROM | disk | FTP | other *** search
/ The Datafile PD-CD 5 / DATAFILE_PDCD5.iso / utilities / p / psfont / !PSfont / !Help < prev    next >
Text File  |  1991-08-20  |  10KB  |  192 lines

  1. !PSfont - RISC OS to PostScript Font Converter                   
  2.  
  3. Copyright © 1991 C.R. Smale
  4.  
  5. This program has been released into the public domain for personal use.
  6. If you want to use !PSfont or its output in any commercial way whatsoever,
  7. you must have my explicit permission.  Also you are warned that holders
  8. of the copyright in fonts for use with RISC OS *might* take issue with you.
  9. If they do, I don't want to know.  I *would* like to know about any problems,
  10. suggestions or success stories however!
  11.  
  12. Author:        Colin Smale
  13.                Spechtenkamp 87
  14.                3607 KE MAARSSENBROEK
  15.                The Netherlands
  16.                Tel:  +31 3465 69038
  17.                E-mail: colin@integow.uucp
  18.  
  19. With thanks to Andrew Brooks (arb@comp.lancs.ac.uk) for many improvements!
  20.  
  21. !PSfont - Usage Notes
  22. =====================
  23.  
  24. Version 1.3, 20th August 1991
  25.  
  26. !PSfont takes a RISC OS font and produces a PostScript font program which
  27. can be downloaded to a PostScript compatible printer.  This allows use
  28. of any font available under RISC OS with the PostScript Printer Driver
  29. !PrinterPS, which has a drawback in that it provides no mechanism for
  30. using fonts which are not resident in the printer.
  31.  
  32. The information in <font>.Outlines and <font>.IntMetrics is used as a basis.
  33. Additionally, the user has to provide a file <font>.Encoding, which contains
  34. information for mapping the characters in the font to their corresponding
  35. PostScript character names.  This information is required in order to
  36. produce a correct encoding vector in the output which is compatible with
  37. the PostScript standard.  The Printer Driver also remaps the character
  38. codes from PostScript standard back to RISC OS encoding;  this is not always
  39. 100% successful as there are various character sets and encoding vectors
  40. in use with RISC OS fonts.
  41.  
  42. Before converting a font you should put together the <font>.Encoding file.
  43. The syntax of the file is described later.  However, a default encoding
  44. for ISO Latin1 (<PSFont$Dir>.Encoding.Latin1) is used if the file
  45. <font>.Encoding is not present.  If the font is a dingbats-type symbol
  46. font, selecting "PostScript Symbol" encoding for the output causes the
  47. file <PSFont$Dir>.Encoding.Symbol to be used instead. By selecting the
  48. 'Acorn Latin1 Extensions' icon, the default for text fonts is called
  49. 'Latin1Ext' instead of 'Latin1'.  This encoding file contains an extended
  50. definition of the Latin1 Alphabet commonly used in RISC OS fonts.
  51.  
  52. Also, ensure that the Font$Path system variable is set up correctly.
  53.  
  54. The output of !PSfont is always placed in <font>.PostScript.
  55.  
  56. Upon starting, !PSfont displays a dialog box with various fields to be
  57. filled in.  The most important is the name of the RISC OS font to be
  58. converted.  Enter the name in the traditional way, e.g.
  59. Garamond.Light.Italic. The font name is automatically capitalised and
  60. located by means of <Font$Path>.  You may also select a font by dragging
  61. either the "Outlines" file, or the directory containing it, onto the window.
  62. This name is used to initialise the other fields, such as the name under
  63. which the font will be defined to PostScript.
  64.  
  65. There is an option to make the font cacheable in the printer.  With this
  66. option ON, the character definitions will be cached in the printer, taking
  67. up space in the font cache but saving time if the characters are
  68. subsequently used again.  If this option is OFF, the bitmaps will not be
  69. stored in the font cache but will be regenerated from the relevant procedure
  70. each time the character is used.
  71.  
  72. A choice of encoding vectors is provided.  The program will either generate
  73. an encoding vector compatible with the PostScript encoding (text or symbol),
  74. or compatible with the font's own encoding vector as determined from the
  75. <font>.Encoding file.  The former should be used for most purposes.  The
  76. latter should only be used if you know what you're doing!  Not that an
  77. incorrect encoding vector will cause horrendous problems; undefined
  78. characters simply do not appear on the paper.
  79.  
  80. Type 1 versus Type 3 Fonts
  81. ==========================
  82.  
  83. There are two methods of defining a font in PostScript, called Type 1 and
  84. Type 3. Type 1 fonts are encrypted so you can't recreate the character
  85. definitions from the jumble of hex bytes.  Also, Type 1 fonts are 'cleverer'
  86. in that the operators to draw a character can be influenced in such a way as
  87. to improve the appearance of the font, particularly at smaller point sizes;
  88. this is called 'hinting'.  A further advantage of Type 1 is that the fonts
  89. take up much less valuable memory in the printer, thus allowing more fonts
  90. to be used in one document.
  91.  
  92. Type 3 fonts on the other hand are in clear PostScript with no encryption.
  93. The character definitions can use any of the normal PS graphics operators.
  94. No hinting mechanism is intrinsically provided by PostScript interpreters.
  95. Such fonts are much easier to produce with machine conversions such as !PSfont,
  96. which is why the earlier versions only worked with Type 3.
  97.  
  98. Version 1.3 of !PSfont does not produce any hinting information in Type 1
  99. fonts.  RISC OS fonts, the better ones anyway, contain a wealth of so-called
  100. scaffold lines which appear to be a suitable basis for creating hints.  I will
  101. be investigating this in the future...
  102.  
  103. Use with !PrinterPS
  104. ===================
  105.  
  106. A modified version of PSprolog (for use with !PrinterPS V2.4X) is also
  107. included, which works correctly with Type 3 fonts.  The standard version
  108. only works with Type 1 fonts, such as the ones built into most PostScript
  109. printers.
  110.  
  111. !PrinterPS does not download any fonts; you will have to do this by inserting
  112. the fonts into the output of the printer driver at suitable places such as
  113. at the start of the file.
  114.  
  115. Encoding Vectors For RISC OS Fonts
  116. ==================================
  117.  
  118. Most RISC OS text fonts (as opposed to symbol fonts) that I have seen comply
  119. more or less with the ISO Latin 1 alphabet on page 1824 of the PRM.  There
  120. are a few areas in which problems can arise; notably in the range &80-&9F
  121. (blank in the PRM diagram) and at &D7 (multiply) and &F7 (divide).  The latter
  122. two characters are often replaced with 'OE' and 'oe' respectively.  There
  123. are however a number of ways used to fill the range &80-&9F.
  124.  
  125. The most convenient way to get an overview of the characters in a font is by
  126. using Acorn's Outline Font Editor !FontEd.
  127.  
  128. Syntax Of The Encoding File
  129. ===========================
  130.  
  131. Create this file using !Edit.
  132.  
  133. The file contains a list of up to 256 character names, which should correspond
  134. to the PostScript naming conventions (although this is not enforced at the
  135. moment).  Each line can contain multiple names, separated by white space.
  136.  
  137. The character '#' introduces a comment until the end of the line.
  138.  
  139. The character '=' followed by a number indicates that the character codes of
  140. the following names start at that number.  This is useful for skipping
  141. ranges of undefined characters.  E.g. =128 means 'goto 128'.  The number is
  142. fed through EVAL so hexadecimal numbers preceded by & can also be used.
  143.  
  144. The character '@' followed by a filename means 'call' that file in a nested
  145. manner, i.e. return to the original file when done.  The character code
  146. pointer is set to zero at the start of every file.  This can be used to 'call'
  147. a file containing the default character mappings which can then be selectively
  148. modified by the original Encoding file.  Example: @<PSfont$Dir>.Encoding.Latin1
  149.  
  150. The name '*' is special.  It means 'undefine' this character.  This is useful
  151. if the basic mapping from a 'call' file defines a character which is not
  152. present in the font in question.
  153.  
  154. The name '.' means skip this character in the encoding file, leaving its
  155. current definition as it is.  This is useful for skipping one or two characters
  156. at a time without using the '=' syntax described above.
  157.  
  158. After processing the Encoding file, the character name for a given character
  159. code is the last name encountered for that code.
  160.  
  161. A minimal file, using the ISO Latin 1 alphabet, would be as follows:
  162.  
  163.          # encoding vector
  164.          @<PSfont$Dir>.Encoding.Latin1
  165.  
  166. Three basic files are provided with the program in directory
  167. <PSfont$Dir>.Encoding: Latin1, Latin1Ext and Symbol.  The latter i