home *** CD-ROM | disk | FTP | other *** search
/ NeXTSTEP 3.3.4.17 [SPARC, PA-RISC] / nextstep33_risc.iso / NextLibrary / TeX / mf / inputs / U_Wash.mf < prev    next >
Text File  |  1995-02-07  |  12KB  |  264 lines

  1. % File:       MF Inputs U_Wash.mf
  2. % Author:     Pierre A. MacKay
  3. % Internet:   mackay@cs.washington.edu
  4. % Date:       November 27, 1988
  5. %
  6. % This is the University of Washington collection of |mode_defs|
  7. % together with the macros to provide font-wide specials describing the
  8. % |mode_def| that is used for each generated font, and the Xerox-world
  9. % comments in the tfm file.  If a "?" is typed as the first response
  10. % to the "*" prompt after this or a derived base file is loaded,
  11. % a list of all current |mode_def|s will be given.
  12. %
  13. % This file follows a convention that has emerged in the discussion
  14. % of |mode_def|s in TUGboat.  
  15. %    1.  The print engine is identified wherever possible, rather than
  16. %        the printer which incorporates that print-engine.
  17. %    2.  Because |mode_def| names may not contain digits, each digit is
  18. %        given its full name, as in RicohFourZeroEightZero.
  19. %
  20. % WARNING: Some of the modes have never actually been tested
  21.  
  22. base_version:=base_version&"/U_Wash";
  23.  
  24. input white_setup               
  25.  
  26. % if a mode_def includes the statement: let font_setup = white_setup,
  27. % it will replace the cmbase.mf font_setup with this corrected version
  28.  
  29. mode_def help =               % What modes exist in this preload?
  30.  for i=1 upto number_of_modes:
  31.    message mode_name[i];
  32.  endfor; 
  33.  save ?; % only use this once.  it doesn't make sense to repeat
  34. enddef;
  35.  
  36. let ? = help_;
  37.  
  38. % Canon CX mode: for the Laser-writer (same as WAITS.MF Imagen)
  39. mode_def CanonCX =
  40.  proofing:=0;                   % no, we're not making proofs
  41.  fontmaking:=1;                 % yes, we are making a font
  42.  tracingtitles:=0;              % no, don't show titles at all
  43.  pixels_per_inch:=300;          % the new Canon engine at 300/inch
  44.  blacker:=0;                    % Canon engine is black enough
  45.  fillin:=.2;                    % very small compensation for diagonal fillin
  46.  o_correction:=.6;              % but don't overshoot as much
  47.  enddef;
  48.  
  49. % Ricoh 4080: for the TI Omnilaser (Stan Osborne's values TUGboat 8,2,134)
  50. mode_def RicohFourZeroEightZero =
  51.  let font_setup=white_setup;    % use the write-white font_setup
  52.  proofing:=0;                   % no, we're not making proofs
  53.  fontmaking:=1;                 % yes, we are making a font
  54.  tracingtitles:=0;              % no, don't show titles at all
  55.  pixels_per_inch:=300;          % Ricoh write-white engine.
  56.  blacker:=.2;                   % Don't overblack the small fonts
  57.  fillin:=-.2;                   % reverse compensation for diagonal fillin
  58.  o_correction:=.5;              % but don't overshoot as much
  59.  enddef;
  60.  
  61. % Varityper 600: for the Varityper Laser 600.
  62. mode_def VarityperSixZeroZero =
  63.  proofing:=0;                   % no, we're not making proofs
  64.  fontmaking:=1;                 % yes, we are making a font
  65.  tracingtitles:=0;              % no, don't show titles at all
  66.  pixels_per_inch:=600;          % Good but not perfect
  67.  blacker:=0;                    % Seems black enough. Lighter than 300dpi
  68.  fillin:=0;                     % but it ought to be.  Closer to true
  69.  o_correction:=0;               % Modern proportions.  Real problem is
  70.  enddef;                        % toner irregularity
  71.  
  72. % Canon LBP 10: for the Symbolics LGP-10 (same as WAITS.MF canon)
  73. mode_def CanonLBP =
  74.  proofing:=0;                   % no, we're not making proofs
  75.  fontmaking:=1;                 % yes, we are making a font
  76.  tracingtitles:=0;              % no, don't show titles at all
  77.  pixels_per_inch:=240;          % the old Canon engine at 240/inch
  78.  blacker:=.2;                   % make pens a wee bit blacker
  79.  fillin:=.2;                    % compensate for diagonal fillin
  80.  o_correction:=.4;              % but don't overshoot as much as lowres
  81.  enddef;
  82.  
  83. mode_def crs =                  % crs mode: for the Alphatype CRS (WAITS.MF)
  84.   proofing:=0;                  % no, we're not making proofs
  85.  fontmaking:=1;                 % yes, we are making a font
  86.  tracingtitles:=1;              % yes, show titles online
  87.  begingroup interim warningcheck:=0;  % (we need to go past 4096)
  88.   pixels_per_inch:=4000+4000/3 endgroup;  % HIGH res
  89.  blacker:=4;                    % make pens a lot blacker
  90.  fillin:=0;                     % but don't compensate for fillin
  91.  o_correction:=1;               % and keep the full overshoot
  92.  enddef;
  93.  
  94. mode_def OneTwoZero=            % Micro-TeX, (maybe bitgraph and sun)
  95.  proofing:=0;                   % no, we're not making proofs
  96.  fontmaking:=1;                 % yes, we are making a font
  97.  tracingtitles:=0;              % no, don't show titles in the log
  98.  pixels_per_inch:=120;          % for the 120pxl fonts
  99.  blacker:=.35;                  % make pens a bit blacker (Karl Berry's value)
  100.  fillin:=.1;                    % and compensate for diagonal fillin
  101.  o_correction:=.3;              % but don't overshoot much
  102.  enddef;
  103.  
  104. mode_def bitgraph =             % bitgraph and sun (the original settings)
  105.  proofing:=0;                   % no, we're not making proofs
  106.  fontmaking:=1;                 % yes, we are making a font
  107.  tracingtitles:=0;              % no, don't show titles in the log
  108.  pixels_per_inch:=118;          % for the oversize *.590pxl fonts
  109.  blacker:=.55;                  % make pens a bit blacker
  110.  fillin:=.1;                    % and compensate for diagonal fillin
  111.  o_correction:=.3;              % but don't overshoot much
  112.  enddef;
  113.  
  114. mode_def sun =                  % bitgraph and sun screens (true size)
  115.  proofing:=0;                   % no, we're not making proofs
  116.  fontmaking:=1;                 % yes, we are making a font
  117.  tracingtitles:=0;              % no, don't show titles in the log
  118.  pixels_per_inch:=100;          % try it to see if it will do
  119.  blacker:=.35;                  % make pens a bit blacker (Karl Berry's value)
  120.  fillin:=.1;                    % and compensate for diagonal fillin
  121.  o_correction:=.3;              % but don't overshoot much
  122.  enddef;
  123.  
  124. % Three Macintosh values -- Pure guesswork, since no conversion
  125. % program available.
  126.  
  127. mode_def truemac=
  128. screens (true size)
  129.  proofing:=0;                   % no, we're not making proofs
  130.  fontmaking:=1;                 % yes, we are making a font
  131.  tracingtitles:=0;              % no, don't show titles in the log
  132.  pixels_per_inch:=72;           % too small to be really useful
  133.  blacker:=.35;                  % make pens a bit blacker (Who knows?)
  134.  fillin:=.1;                    % and compensate for diagonal fillin
  135.  o_correction:=.3;              % but don't overshoot much
  136.  enddef;
  137.  
  138. mode_def bettermac =            % same as a magstep up from preceding
  139.  proofing:=0;                   % no, we're not making proofs
  140.  fontmaking:=1;                 % yes, we are making a font
  141.  tracingtitles:=0;              % no, don't show titles in the log
  142.  pixels_per_inch:=86.4;         % Considerable improvement at this resolution
  143.  blacker:=.35;                  % make pens a bit blacker (Karl Berry's value)
  144.  fillin:=.1;                    % and compensate for diagonal fillin
  145.  o_correction:=.3;              % but don't overshoot much
  146.  enddef;
  147.  
  148. mode_def imagewriter =          % could be reached by magsteps from 100 or 120
  149.  proofing:=0;                   % no, we're not making proofs
  150.  fontmaking:=1;                 % yes, we are making a font
  151.  tracingtitles:=0;              % no, don't show titles in the log
  152.  pixels_per_inch:=144;          % Image-writer is twice screen density
  153.  blacker:=0;                    % assume same as Epson owing to ink flow
  154.  fillin:=0.3;                   % try correcting fillin at this resolution
  155.  o_correction:=.2;              % don't overshoot much
  156.  enddef;
  157.  
  158. % End of Macintosh values
  159.  
  160. mode_def epson =  % Epson (Charles Karney's values TUGboat 8,2 p. 133)
  161.  proofing:=0;                   % no, we're not making proofs
  162.  fontmaking:=1;                 % yes, we are making a font
  163.  tracingtitles:=0;              % no, don't show titles in the log
  164.  pixels_per_inch:=240;          % lowres
  165.  blacker:=0;                    % don't make the pens any blacker
  166.  fillin:=0;                     % and don't compensate for fillin
  167.  o_correction:=.2;              % but suppress most overshoots
  168.  aspect_ratio:=9/10;            % 216 dots/inch vertical
  169.  enddef;
  170.  
  171. % This pair is hopeful, that maybe Ultre*setter may become
  172. % usable one day
  173.  
  174. mode_def ultre =                % Ultre*setter normal 1200dpi good fonts.
  175.  proofing:=0;                   % no, we're not making proofs
  176.  fontmaking:=1;                 % yes, we are making a font
  177.  tracingtitles:=0;              % no, don't show titles at all
  178.  pixels_per_inch:=1200;         % the normal 1200 dot/inch font
  179.  blacker:=0;                    % probably unnecessary at this resolution
  180.  fillin:=0;                     % This unneeded too
  181.  o_correction:=0;               % keep an eye on this
  182.  enddef;
  183.  
  184. mode_def supre =                % Ultre*setter 2400dpi for super fonts.
  185.  proofing:=0;                   % no, we're not making proofs
  186.  fontmaking:=1;                 % yes, we are making a font
  187.  tracingtitles:=0;              % no, don't show titles at all
  188.  pixels_per_inch:=2400;         % 
  189.  blacker:=0;                    % probably unnecessary at this resolution
  190.  fillin:=0;                     % This unneeded too
  191.  o_correction:=0;               % keep an eye on this
  192.  enddef;
  193.  
  194.  
  195. localfont:=CanonCX;             % the mode most commonly used to make fonts
  196.  
  197. % It is customary to input another file to supplement the PLAIN base.
  198. % This supplementary file adds analogous modes, corresponding to
  199. % local output devices, and it redefines `localfont' as appropriate.
  200. % The values of screen_rows and screen_cols should also be updated.
  201. % The auxiliary file should set base_version:=base_version&"/localname".
  202. % Remember that the present file PLAIN.MF should not be changed;
  203. % all local changes should be confined to a separate file.
  204.  
  205. % Macros to add mode information specials to fonts.
  206.  
  207. def mode_special(suffix $) =
  208.   string s,d;
  209.   s:=str$; d:=decimal scantokens s;
  210.   special s&":="&d&";" enddef;
  211.  
  212. def font_mode_specials =
  213.  p_p_i=pixels_per_inch/mag; 
  214.  if fontmaking > 0:
  215.  begingroup; save d,s,p; save pixels_per_inch;
  216.   string p;
  217.   pixels_per_inch:=p_p_i;
  218.   special jobname;
  219.   mode_special(mag);
  220.   if string mode: p:=mode;
  221.   else: p:=substring(0,length(mode_name[mode])-1) of mode_name[mode]; fi
  222.   special "mode:="&p&";";
  223.   mode_special(pixels_per_inch);
  224.   mode_special(blacker);
  225.   mode_special(fillin);
  226.   mode_special(o_correction);
  227.  endgroup;
  228.  fi
  229. enddef;
  230.  
  231. % Finally, here are macros for Xerox-world font info.
  232. % These can be useful even if you never use a Xerox printer.
  233. % For instance, crudetype uses the |coding_scheme|
  234. % and it is nice to have the font family on record.  Some
  235. % of this goes into the TFM, rather than the GF file.
  236.  
  237. def font_family expr s =  % string s names the font family, e.g., "CMR"
  238.  headerbyte 49: BCPL_string(s,20);
  239.  special "identifier "&s enddef;
  240. def coding_scheme expr s = % string s names the scheme, e.g. "TEX TEXT"
  241.  headerbyte 9: BCPL_string(s,40);
  242.  special "codingscheme "&s enddef;
  243. def font_face_byte expr x = % integer x gives the family member number,
  244.  headerbyte 72: x;          % which should be between 0 and 255
  245.  special "fontfacebyte"; numspecial x enddef;
  246.  
  247. def BCPL_string(expr s,n)= % string s becomes an n-byte BCPL string
  248.  for l:=if length(s)>=n: n-1 else: length(s) fi: l
  249.   for k:=1 upto l: , substring (k-1,k) of s endfor
  250.   for k:=l+2 upto n: , 0 endfor endfor enddef;
  251.  
  252. Xerox_world:=1;    % users can say `if known Xerox_world:...fi'
  253.  
  254. inner end;
  255. def bye=
  256.  if fontmaking > 0:  font_family font_identifier_;
  257.   coding_scheme font_coding_scheme_;
  258.   font_face_byte max(0,254-round 2designsize); 
  259.   font_mode_specials; fi
  260.  end
  261.  enddef;
  262.  
  263. outer bye,end;
  264.