home *** CD-ROM | disk | FTP | other *** search
/ Fresh Fish 2 / FFMCD02.bin / new / text / font / metafont / inputs / pastex-modes.mf < prev    next >
Encoding:
Text File  |  1993-12-21  |  16.1 KB  |  390 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/G_Hessmann";
  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. % redefined for Passauer TeX, new definition below
  95. %mode_def OneTwoZero=            % Micro-TeX, (maybe bitgraph and sun)
  96. % proofing:=0;                   % no, we're not making proofs
  97. % fontmaking:=1;                 % yes, we are making a font
  98. % tracingtitles:=0;              % no, don't show titles in the log
  99. % pixels_per_inch:=120;          % for the 120pxl fonts
  100. % blacker:=.35;                  % make pens a bit blacker (Karl Berry's value)
  101. % fillin:=.1;                    % and compensate for diagonal fillin
  102. % o_correction:=.3;              % but don't overshoot much
  103. % enddef;
  104.  
  105. mode_def bitgraph =             % bitgraph and sun (the original settings)
  106.  proofing:=0;                   % no, we're not making proofs
  107.  fontmaking:=1;                 % yes, we are making a font
  108.  tracingtitles:=0;              % no, don't show titles in the log
  109.  pixels_per_inch:=118;          % for the oversize *.590pxl fonts
  110.  blacker:=.55;                  % make pens a bit blacker
  111.  fillin:=.1;                    % and compensate for diagonal fillin
  112.  o_correction:=.3;              % but don't overshoot much
  113.  enddef;
  114.  
  115. % There might be other uses for this, but for now the only obvious
  116. % use is to provide precise glyph positioning for gftodvi proofs
  117. % on a Sun display.  To get a tfm file of the right size, use
  118. % the mode for the targeted driver, and rename the gf(pk) file produced by
  119. % this operation so that it matches that tfm.  DO NOT use the
  120. % tfm generated by this sun mode_def, and do not use the gf(pk) file
  121. % generated by the <driver> mode_def..
  122. mode_def sun =                  % Sun CRT true size, for gray fonts.
  123.  proofing:=0;                   % no, we're not making proofs
  124.  fontmaking:=1;                 % yes, we are making a font
  125.  tracingtitles:=0;              % no, don't show titles in the log
  126.  pixels_per_inch:=82;           % Resolution reported in the man 4 page.
  127.  aspect_ratio:=19/20;           % 78 dots/inch vertical
  128.  blacker:=0.;                   % 
  129.  fillin:=0.;                    % 
  130.  o_correction:=0.;              % 
  131.  enddef;
  132.  
  133. % Three Macintosh values -- Pure guesswork, since no conversion
  134. % program available.
  135.  
  136. mode_def truemac=
  137. screens (true size)
  138.  proofing:=0;                   % no, we're not making proofs
  139.  fontmaking:=1;                 % yes, we are making a font
  140.  tracingtitles:=0;              % no, don't show titles in the log
  141.  pixels_per_inch:=72;           % too small to be really useful
  142.  blacker:=.35;                  % make pens a bit blacker (Who knows?)
  143.  fillin:=.1;                    % and compensate for diagonal fillin
  144.  o_correction:=.3;              % but don't overshoot much
  145.  enddef;
  146.  
  147. mode_def bettermac =            % same as a magstep up from preceding
  148.  proofing:=0;                   % no, we're not making proofs
  149.  fontmaking:=1;                 % yes, we are making a font
  150.  tracingtitles:=0;              % no, don't show titles in the log
  151.  pixels_per_inch:=86.4;         % Considerable improvement at this resolution
  152.  blacker:=.35;                  % make pens a bit blacker (Karl Berry's value)
  153.  fillin:=.1;                    % and compensate for diagonal fillin
  154.  o_correction:=.3;              % but don't overshoot much
  155.  enddef;
  156.  
  157. mode_def imagewriter =          % could be reached by magsteps from 100 or 120
  158.  proofing:=0;                   % no, we're not making proofs
  159.  fontmaking:=1;                 % yes, we are making a font
  160.  tracingtitles:=0;              % no, don't show titles in the log
  161.  pixels_per_inch:=144;          % Image-writer is twice screen density
  162.  blacker:=0;                    % assume same as Epson owing to ink flow
  163.  fillin:=0.3;                   % try correcting fillin at this resolution
  164.  o_correction:=.2;              % don't overshoot much
  165.  enddef;
  166.  
  167. % End of Macintosh values
  168.  
  169. mode_def epson =  % Epson (Charles Karney's values TUGboat 8,2 p. 133)
  170.  proofing:=0;                   % no, we're not making proofs
  171.  fontmaking:=1;                 % yes, we are making a font
  172.  tracingtitles:=0;              % no, don't show titles in the log
  173.  pixels_per_inch:=240;          % lowres
  174.  blacker:=0;                    % don't make the pens any blacker
  175.  fillin:=0;                     % and don't compensate for fillin
  176.  o_correction:=.2;              % but suppress most overshoots
  177.  aspect_ratio:=9/10;            % 216 dots/inch vertical
  178.  enddef;
  179.  
  180. % This pair is hopeful, that maybe Ultre*setter may become
  181. % usable one day
  182.  
  183. mode_def ultre =                % Ultre*setter normal 1200dpi good fonts.
  184.  proofing:=0;                   % no, we're not making proofs
  185.  fontmaking:=1;                 % yes, we are making a font
  186.  tracingtitles:=0;              % no, don't show titles at all
  187.  pixels_per_inch:=1200;         % the normal 1200 dot/inch font
  188.  blacker:=0;                    % probably unnecessary at this resolution
  189.  fillin:=0;                     % This unneeded too
  190.  o_correction:=0;               % keep an eye on this
  191.  enddef;
  192.  
  193. mode_def supre =                % Ultre*setter 2400dpi for super fonts.
  194.  proofing:=0;                   % no, we're not making proofs
  195.  fontmaking:=1;                 % yes, we are making a font
  196.  tracingtitles:=0;              % no, don't show titles at all
  197.  pixels_per_inch:=2400;         % 
  198.  blacker:=0;                    % probably unnecessary at this resolution
  199.  fillin:=0;                     % This unneeded too
  200.  o_correction:=0;               % keep an eye on this
  201.  enddef;
  202.  
  203. % Begin of my definition section (Georg Hessmann)
  204.  
  205. % First, epsonDraft (120/72)
  206.  
  207. mode_def epsonDraft =          % epsonDraft
  208.  proofing:=0;                   % no, we're not making proofs
  209.  fontmaking:=1;                 % yes, we are making a font
  210.  tracingtitles:=0;              % no, don't show titles in the log
  211.  pixels_per_inch:=120;          % really lowres
  212.  blacker:=0;                    % don't make the pens any blacker
  213.  fillin:=0;                     % and don't compensate for fillin
  214.  o_correction:=.2;              % but suppress most overshoots
  215.  aspect_ratio:=3/5;             % 72 dots/inch vertical
  216.  enddef;
  217.  
  218. % Epson LQ high quality
  219. % epsonLQHQ (360/180)
  220.  
  221. mode_def epsonLQHQ =          % Epson LQ HQ (360/180)
  222.  proofing:=0;                   % no, we're not making proofs
  223.  fontmaking:=1;                 % yes, we are making a font
  224.  tracingtitles:=0;              % no, don't show titles in the log
  225.  pixels_per_inch:=360;          % 
  226.  blacker:=0;                    % don't make the pens any blacker
  227.  fillin:=.1;                    % 
  228.  o_correction:=.3;              % but suppress most overshoots
  229.  aspect_ratio:=1/2;             % 180 dots/inch vertical
  230.  enddef;
  231.  
  232. % Now, NEC Pinwriter
  233. % necHQ (360/360)
  234.  
  235. mode_def necHQ =          % necHQ (360/360)
  236.  proofing:=0;                   % no, we're not making proofs
  237.  fontmaking:=1;                 % yes, we are making a font
  238.  tracingtitles:=0;              % no, don't show titles in the log
  239.  pixels_per_inch:=360;          % 
  240.  blacker:=0;                    % don't make the pens any blacker
  241.  fillin:=.1;                    % 
  242.  o_correction:=.3;              % but suppress most overshoots
  243.  enddef;
  244.  
  245. % necDraft (180/180)
  246.  
  247. mode_def necDraft =          % necDraft (180/180)
  248.  proofing:=0;                   % no, we're not making proofs
  249.  fontmaking:=1;                 % yes, we are making a font
  250.  tracingtitles:=0;              % no, don't show titles in the log
  251.  pixels_per_inch:=180;          % 
  252.  blacker:=0;                    % don't make the pens any blacker
  253.  fillin:=.1;                    % 
  254.  o_correction:=.2;              % but suppress most overshoots
  255.  enddef;
  256.  
  257. % and now the previewer fonts
  258.  
  259. % FourFour (44/44) [really low-res :-) ]
  260.  
  261. mode_def FourFour =
  262.  proofing:=0;                   % no, we're not making proofs
  263.  fontmaking:=1;                 % yes, we are making a font
  264.  tracingtitles:=0;              % no, don't show titles in the log
  265.  pixels_per_inch:=44;           % too small to be really useful
  266.  blacker:=.05;                  % make pens a bit blacker (Who knows?)
  267.  fillin:=.1;                    % and compensate for diagonal fillin
  268.  o_correction:=.2;              % but don't overshoot much
  269.  enddef;
  270.  
  271. % EightThree (83/83)
  272.  
  273. mode_def EightThree =
  274.  proofing:=0;                   % no, we're not making proofs
  275.  fontmaking:=1;                 % yes, we are making a font
  276.  tracingtitles:=0;              % no, don't show titles in the log
  277.  pixels_per_inch:=83;           % very small
  278.  blacker:=0;                    % 
  279.  fillin:=0;                     % 
  280.  o_correction:=.2;              % but don't overshoot much
  281.  enddef;
  282.  
  283. % NineOne (91/91)
  284.  
  285. mode_def NineOne =
  286.  proofing:=0;                   % no, we're not making proofs
  287.  fontmaking:=1;                 % yes, we are making a font
  288.  tracingtitles:=0;              % no, don't show titles in the log
  289.  pixels_per_inch:=91;           % 
  290.  blacker:=0;                    % 
  291.  fillin:=0;                     % 
  292.  o_correction:=.2;              % but don't overshoot much
  293.  enddef;
  294.  
  295. % OneZeroZero (100/100)
  296.  
  297. mode_def OneZeroZero =
  298.  proofing:=0;                   % no, we're not making proofs
  299.  fontmaking:=1;                 % yes, we are making a font
  300.  tracingtitles:=0;              % no, don't show titles in the log
  301.  pixels_per_inch:=100;          % 
  302.  blacker:=0;                    % 
  303.  fillin:=0;                     % 
  304.  o_correction:=.2;              % but don't overshoot much
  305.  enddef;
  306.  
  307. % OneTwoZero (120/120)
  308.  
  309. mode_def OneTwoZero =
  310.  proofing:=0;                   % no, we're not making proofs
  311.  fontmaking:=1;                 % yes, we are making a font
  312.  tracingtitles:=0;              % no, don't show titles in the log
  313.  pixels_per_inch:=120;        %
  314.  blacker:=0;            % screen fonts are black enough
  315.  fillin:=0;            % no compensation for diagonals
  316.  o_correction:=.2;        % don't overshoot much (watch this value)
  317.  enddef;
  318.  
  319. % End of my section (Georg Hessmann)
  320.  
  321. localfont:=OneTwoZero;             % the mode most commonly used to make fonts
  322.  
  323. % It is customary to input another file to supplement the PLAIN base.
  324. % This supplementary file adds analogous modes, corresponding to
  325. % local output devices, and it redefines `localfont' as appropriate.
  326. % The values of screen_rows and screen_cols should also be updated.
  327. % The auxiliary file should set base_version:=base_version&"/localname".
  328. % Remember that the present file PLAIN.MF should not be changed;
  329. % all local changes should be confined to a separate file.
  330.  
  331. % Macros to add mode information specials to fonts.
  332.  
  333. def mode_special(suffix $) =
  334.   string s,d;
  335.   s:=str$; d:=decimal scantokens s;
  336.   special s&":="&d&";" enddef;
  337.  
  338. def font_mode_specials =
  339.  p_p_i=pixels_per_inch/mag; 
  340.  if fontmaking > 0:
  341.  begingroup; save d,s,p; save pixels_per_inch;
  342.   string p;
  343.   pixels_per_inch:=p_p_i;
  344.   special jobname;
  345.   mode_special(mag);
  346.   if string mode: p:=mode;
  347.   else: p:=substring(0,length(mode_name[mode])-1) of mode_name[mode]; fi
  348.   special "mode:="&p&";";
  349.   mode_special(pixels_per_inch);
  350.   mode_special(blacker);
  351.   mode_special(fillin);
  352.   mode_special(o_correction);
  353.  endgroup;
  354.  fi
  355. enddef;
  356.  
  357. % Finally, here are macros for Xerox-world font info.
  358. % These can be useful even if you never use a Xerox printer.
  359. % For instance, crudetype uses the |coding_scheme|
  360. % and it is nice to have the font family on record.  Some
  361. % of this goes into the TFM, rather than the GF file.
  362.  
  363. def font_family expr s =  % string s names the font family, e.g., "CMR"
  364.  headerbyte 49: BCPL_string(s,20);
  365.  special "identifier "&s enddef;
  366. def coding_scheme expr s = % string s names the scheme, e.g. "TEX TEXT"
  367.  headerbyte 9: BCPL_string(s,40);
  368.  special "codingscheme "&s enddef;
  369. def font_face_byte expr x = % integer x gives the family member number,
  370.  headerbyte 72: x;          % which should be between 0 and 255
  371.  special "fontfacebyte"; numspecial x enddef;
  372.  
  373. def BCPL_string(expr s,n)= % string s becomes an n-byte BCPL string
  374.  for l:=if length(s)>=n: n-1 else: length(s) fi: l
  375.   for k:=1 upto l: , substring (k-1,k) of s endfor
  376.   for k:=l+2 upto n: , 0 endfor endfor enddef;
  377.  
  378. Xerox_world:=1;    % users can say `if known Xerox_world:...fi'
  379.  
  380. inner end;
  381. def bye=
  382.  if fontmaking > 0:  font_family font_identifier_;
  383.   coding_scheme font_coding_scheme_;
  384.   font_face_byte max(0,254-round 2designsize); 
  385.   font_mode_specials; fi
  386.  end
  387.  enddef;
  388.  
  389. outer bye,end;
  390.