home *** CD-ROM | disk | FTP | other *** search
/ Fresh Fonts 1 / freshfonts1.bin / bbs / programs / amiga / metafont.lha / MF / INPUTS / modes.mf < prev    next >
Text File  |  1993-11-28  |  39KB  |  1,104 lines

  1. % Compiled 1991 by Karl Berry from modes collected by Doug Henderson,
  2. % Pierre MacKay, and others.  This file is in the public domain.
  3. % Please change the definitions of |localfont|, |screen_cols|, and
  4. % |screen_rows| at the end of file (see explanations below).
  5. % When you make a new |mode_def|, please send it to {\tt
  6. % karl@cs.umb.edu} or {\tt dlatex@cmsa.berkeley.edu}.  Please mention
  7. % what fonts at what sizes you tested it on.  This will help other
  8. % people wondering where particular values came from.  Ideally, you
  9. % would try normal, bold, and italic variants, at sizes around 5$\,$pt,
  10. % 10$\,$pt and 15$\,$pt.
  11. % You can run this file through {\tt mft} to generate a \TeX\
  12. % file, if you like reading typeset output instead of computer screens.
  13. %%% def mode_def
  14. %%% addto font_size coding_scheme font_face_byte landscape landscape_
  15. % @mffile{
  16. %   author = "Pierre MacKay, Doug Henderson, et al."
  17. %   version = "0.7",
  18. %   date = "Tue Jul 23 14:07:37 EDT 1991"
  19. %   filename = "modes.mf",
  20. %   contact = "Karl Berry",
  21. %   email = "karl@cs.umb.edu"
  22. %   address = "135 Center Hill Rd. // Plymouth, MA 02360"
  23. %   checksum = "1103   5359  38973",
  24. %   codetable = "ISO/ASCII",
  25. %   supported = "yes",
  26. %   docstring = "
  27. % This file collects all known \MF\ modes, some of which have not been
  28. % tested.  It also makes definitions to put specials identifying the
  29. % mode in the \MF\ GF output, and to put the coding scheme and other
  30. % so-called Xerox-world information in the TFM output.  Finally, it
  31. % defines some code to handle write-white devices better; this code
  32. % comes into play if a |mode_def| includes the statement
  33. % |mode_write_white_setup_;|.  This only works for those fonts which
  34. % follow Computer Modern's conventions for using |font_setup|.
  35. % This file follows a naming convention that has emerged in the
  36. % discussion of |mode_def|s in {\sl TUGboat}.
  37. % \item{1)} The print engine is identified wherever possible,
  38. %   rather than the printer which incorporates that engine.
  39. % \item{2)} Because |mode_def| names may not contain digits,
  40. %   each digit is spelled out; e.g., {\tt RicohFourZeroEightZero}.
  41. % \item{3)} For historical reasons, some modes have synonyms of all
  42. %   lowercase letters, e.g., `cx' for `CanonCX'.  These abbreviations
  43. %   mostly come from {\tt waits.mf}, a predecessor to this file.
  44. %
  45. % This file is typically loaded when making a \MF\ base; for example,
  46. % the command line {\tt inimf plain input modes} makes a file {\tt
  47. % plain.base} (or {\tt plain.bas}, or something like that) with all the
  48. % modes herein defined (plain itself defines modes called |proof|,
  49. % |smoke|, and |lowres|.)
  50. % A user selects a particular mode when s/he runs \MF, by assigning to
  51. % the variable |mode|.  For example, typing
  52. % {\tt \char`\\mode:=CanonCX; input cmr10}
  53. % sets up values appropriate for the CanonCX engine.
  54. % If no mode is assigned, the default is |proof| mode, as stated in {\sl
  55. % The \MF book}.  This is the cause of the ``{\tt .2602gf}'' files which
  56. % are a periodic question in the \TeX\ community.  The remedy is simply
  57. % to assign a different mode---|localfont|, for example.
  58. % Every site should define the mode |localfont| to be a synonym for the
  59. % mode most commonly used there.  This file defines |localfont| to be
  60. % |CanonCX|.  The values for |screen_rows| and |screen_cols|, which
  61. % determine how big \MF's window for online output is, should perhaps
  62. % also be changed; individual users should definitely change them to
  63. % their own tastes.
  64. % This file defines {\tt ?} to type out a list of all the known
  65. % |mode_def|s (once only).
  66. % A |mode_def| is a \MF\ definition that typically consists of a series
  67. % of assignments to various device-specific variables, either primitive
  68. % or defined in plain.  These variables include the following (page
  69. % numbers refer to {\sl The \MF book\/}:
  70. % |aspect_ratio|: the ratio of the vertical resolution to the horizontal
  71. %   resolution (page 94).
  72. % |blacker|: a correction added to the width of stems and similar
  73. %   features, to account for devices which would otherwise make them too
  74. %   light (page 93).  (Write-white devices are best handled by a more
  75. %   sophisticated method than adding to |blacker|, as explained above.)
  76. % |fillin|: a correction factor for diagonals and other features which
  77. %   would otherwise be ``filled in'' (page 94).  An ideal device would
  78. %   have |fillin=0| (page 94).  Negative values for |fillin| will
  79. %   probably either gross effects or none at all.
  80. % |fontmaking|: if nonzero at the end of the job, \MF\ makes a TFM file
  81. %   (page 315).
  82. % |o_correction|: a correction factor for the ``overshoot'' of curves
  83. %   beyond the baseline (or x-height, or some other line).  High
  84. %   resolution curves look better with overshoot, so such devices should
  85. %   have |o_correction=1|; but at low resolutions, the overshoot appears
  86. %   to simply be a distortion (page 93).  Here some additional comments
  87. %   about |o_correction|, courtesy of Pierre MacKay (edited by Karl):
  88. %   At present, I find that |o_correction| works nicely at 80 pixels per
  89. %   em, and gets increasingly disturbing as you move down towards 50
  90. %   pixels per em. Below that I do not think it ought to happen at all.
  91. %
  92. %   The problem, of course, is that full |o_correction| is supposed to
  93. %   occur only at the zenith and nadir of the curve of `o', which is a
  94. %   small region at high resolution, but may be a long line of
  95. %   horizontal pixels at medium resolution.  The full |o_correction|
  96. %   does not change a 300$\,$dpi {\tt cmr10}, but it changes a 21-pixel
  97. %   high {\tt cmr12} to be 23 pixels high.  The extra height and depth
  98. %   is seen along a line of seven pixels at the bottom and five at the
  99. %   top.  This is a pronounced overshoot indeed.
  100. %
  101. %   For high-resolution devices, such as phototypesetters, the values
  102. %   for |blacker|, |fillin|, and |o_correction| don't matter all that
  103. %   much, so long as the values are within their normal ranges: between
  104. %   0 and 1, with the values approaching 0, 0, and 1 respectively.
  105. % |pixels_per_inch|: the horizontal resolution; the \MF\ primitive
  106. %   |hppp| (which is what determines the extension on the GF filename,
  107. %   as among other things) is computed from this (page 94).
  108. %
  109. %   To be more precise, you can determine the resolution of a font given
  110. %   a |mode_def| and a magnification |m| by simply multiplying
  111. %   |pixels_per_inch| for that |mode_def| by |m|.  (Of course, your
  112. %   results may differ from \MF's if you don't use equivalent
  113. %   fixed-point arithmetic routines.)  Then you can determine the number
  114. %   used in the name of the GF font output by rounding.  For example, a
  115. %   font generated at |magstep(.5)| (which is $\sqrt{1.2}$, which \MF
  116. %   computes as 1.09544) for a printer with |pixels_per_inch=300| will
  117. %   have a resolution of 328.63312 dots per inch, and the GF filename
  118. %   will include the number {\tt 329}.
  119. %
  120. % |proofing|: says whether to put additional specials in the GF file for
  121. %   use in making proofsheets with the assistance of, e.g., the utility
  122. %   program {\tt GFtoDVI} (page 323--4).
  123. % |tracingtitles|: if nonzero, strings that appear as \MF\ statements
  124. %   are typed on the terminal (page 187).
  125. % Neenie Billawala's article in the April 1987 issue of {\sl TUGboat}
  126. % describes how to test your printer for the best set of values for the
  127. % magic numbers above.  Here are some brief comments on the subject,
  128. % courtesy of {\tt rocky@ibm.com}, again edited by Karl:
  129. % For medium-to-low resolution devices, you can first set the |blacker|
  130. % and |o_correction| to~0 and decide on a |fillin| value by looking at
  131. % the diagonal of a lowercase `z' in the typewriter font. The diagonal
  132. % should be the same thickness as the horizontal bars of the `z'. Then I
  133. % decide on the |blacker| value, generally by checking the smaller fonts
  134. % for too much filling in.  Finally, you can set the |o_correction|
  135. % using the guidelines suggested above.
  136. %"
  137. % }
  138.  
  139. % Identify ourselves in the format file.
  140. base_version := base_version & "/modes 0.7";
  141.  
  142.  
  143. % Here are useful macros (also called definitions) that we will use
  144. % throughout.
  145.  
  146. % First, some comments about how th