home *** CD-ROM | disk | FTP | other *** search
/ Mega Top 1 / os2_top1.zip / os2_top1 / APPS / TEKST / DVID15G1 / EMTEX / MFINPUT / LOCAL.MF
Text File  |  1994-02-19  |  9KB  |  238 lines

  1. %
  2. % local.mf
  3. %
  4.  
  5. %
  6. % Define modes
  7. %
  8. mode_def hplaser =     % HP LaserJet+
  9.  proofing:=0;          % no, we're not making proofs
  10.  fontmaking:=1;        % yes, we are making a font
  11.  tracingtitles:=0;     % no, don't show titles in the log
  12.  pixels_per_inch:=300;
  13.  blacker:=0;           % The LaserJet is black enough
  14.  fillin:=.2;           % and it tends to fill in diagonals
  15.  o_correction:=.6;     % 
  16.  enddef;
  17.  
  18. mode_def hplaserIV =   % HP LaserJet IV (600 DPI)
  19.  proofing:=0;          % no, we're not making proofs
  20.  fontmaking:=1;        % yes, we are making a font
  21.  tracingtitles:=0;     % no, don't show titles in the log
  22.  pixels_per_inch:=600;
  23.  blacker:=0;           % The LaserJet is black enough
  24.  fillin:=.2;           % and it tends to fill in diagonals
  25.  o_correction:=.6;     % 
  26.  enddef;
  27.  
  28. mode_def kyocera =     % Kyocera F-1010
  29.  proofing:=0;          % no, we're not making proofs
  30.  fontmaking:=1;        % yes, we are making a font
  31.  tracingtitles:=0;     % no, don't show titles in the log
  32.  pixels_per_inch:=300;
  33.  blacker:=0;           % The Kyocera is black enough
  34.  fillin:=.2;           % and it tends to fill in diagonals
  35.  o_correction:=.6;     %
  36.  enddef;
  37.  
  38. mode_def epsonfx =     % Epson FX-80 (240x216)
  39.  proofing:=0;          % no, we're not making proofs
  40.  fontmaking:=1;        % yes, we are making a font
  41.  tracingtitles:=0;     % no, don't show titles in the log
  42.  pixels_per_inch:=240;
  43.  blacker:=0;           % don't make the pens any blacker
  44.  fillin:=0;            % and don't compensate for fillin
  45.  o_correction:=.2;     % but suppress most overshoots
  46.  aspect_ratio:=9/10;   % 216 dots/inch vertically
  47.  enddef;
  48.  
  49. mode_def epsonfxl =    % Epson FX-80 (landscape mode: 216x240)
  50.  proofing:=0;          % no, we're not making proofs
  51.  fontmaking:=1;        % yes, we are making a font
  52.  tracingtitles:=0;     % no, don't show titles in the log
  53.  pixels_per_inch:=216;
  54.  blacker:=0;           % don't make the pens any blacker
  55.  fillin:=0;            % and don't compensate for fillin
  56.  o_correction:=.2;     % but suppress most overshoots
  57.  aspect_ratio:=10/9;   % 240 dots/inch `vertically'
  58.  enddef;
  59.  
  60. mode_def epsonmx =     % Epson MX-80
  61.  proofing:=0;          % no, we're not making proofs
  62.  fontmaking:=1;        % yes, we are making a font
  63.  tracingtitles:=0;     % no, don't show titles in the log
  64.  pixels_per_inch:=120;
  65.  blacker:=0;           % don't make the pens any blacker
  66.  fillin:=0;            % and don't compensate for fillin
  67.  o_correction:=.2;     % but suppress most overshoots
  68.  aspect_ratio:=9/5;    % 216 dots/inch vertically
  69.  enddef;
  70.  
  71. mode_def lqhires =     % NEC-P6 high resolution (360x360)
  72.  proofing:=0;          % no, we're not making proofs
  73.  fontmaking:=1;        % yes, we are making a font
  74.  tracingtitles:=0;     % no, don't show titles in the log
  75.  pixels_per_inch:=360;
  76.  blacker:=0;           % don't make the pens any blacker
  77.  fillin:=0;            % and don't compensate for fillin
  78.  o_correction:=.4;     % but suppress most overshoots
  79.  enddef;
  80.  
  81. mode_def lqmedres =    % LQ-1500, NEC-P6 medium resolution (360x180)
  82.  proofing:=0;          % no, we're not making proofs
  83.  fontmaking:=1;        % yes, we are making a font
  84.  tracingtitles:=0;     % no, don't show titles in the log
  85.  pixels_per_inch:=360;
  86.  blacker:=0;           % 0.3 avoids `holes'
  87.  fillin:=0;            % and don't compensate for fillin
  88.  o_correction:=.1;     % but suppress most overshoots
  89.  aspect_ratio:=1/2;    % 180 dots/inch vertically
  90.  enddef;
  91.  
  92. mode_def lqmedresl =   % LQ-1500, NEC-P6 medium resolution (180x360)
  93.  proofing:=0;          % no, we're not making proofs
  94.  fontmaking:=1;        % yes, we are making a font
  95.  tracingtitles:=0;     % no, don't show titles in the log
  96.  pixels_per_inch:=180;
  97.  blacker:=0;           % 0.3 avoids `holes'
  98.  fillin:=0;            % and don't compensate for fillin
  99.  o_correction:=.1;     % but suppress most overshoots
  100.  aspect_ratio:=2;      % 360 dots/inch vertically
  101.  enddef;
  102.  
  103. mode_def lqlores =     % LQ-1500, NEC-P6 low resolution (180x180)
  104.  proofing:=0;          % no, we're not making proofs
  105.  fontmaking:=1;        % yes, we are making a font
  106.  tracingtitles:=0;     % no, don't show titles in the log
  107.  pixels_per_inch:=180;
  108.  blacker:=0;           % don't make the pens any blacker
  109.  fillin:=0;            % and don't compensate for fillin
  110.  o_correction:=.1;     % but suppress most overshoots
  111.  enddef;
  112.  
  113. mode_def itoh =        % C.ITOH 8510A (160x144)
  114.  proofing:=0;          % no, we're not making proofs
  115.  fontmaking:=1;        % yes, we are making a font
  116.  tracingtitles:=0;     % no, don't show titles in the log
  117.  pixels_per_inch:=160;
  118.  blacker:=0;           % don't make the pens any blacker
  119.  fillin:=0;            % and don't compensate for fillin
  120.  o_correction:=.1;     % but suppress most overshoots
  121.  aspect_ratio:=9/10;   % 144 dots/inch vertically
  122.  enddef;
  123.  
  124. mode_def itohl =       % C.ITOH 8510A (landscape mode: 144x160)
  125.  proofing:=0;          % no, we're not making proofs
  126.  fontmaking:=1;        % yes, we are making a font
  127.  tracingtitles:=0;     % no, don't show titles in the log
  128.  pixels_per_inch:=144;
  129.  blacker:=0;           % don't make the pens any blacker
  130.  fillin:=0;            % and don't compensate for fillin
  131.  o_correction:=.1;     % but suppress most overshoots
  132.  aspect_ratio:=10/9;   % 160 dots/inch `vertically'
  133.  enddef;
  134.  
  135. mode_def fax =         % FAX (204x196)
  136.  proofing:=0;          % no, we're not making proofs
  137.  fontmaking:=1;        % yes, we are making a font
  138.  tracingtitles:=0;     % no, don't show titles in the log
  139.  pixels_per_inch:=204;
  140.  blacker:=0;           % don't make the pens any blacker
  141.  fillin:=0;            % and don't compensate for fillin
  142.  o_correction:=.1;     % but suppress most overshoots
  143.  aspect_ratio:=196/204;% 196 dots/inch vertically
  144.  enddef;
  145.  
  146. mode_def faxl =        % FAX (landscape mode: 196x204)
  147.  proofing:=0;          % no, we're not making proofs
  148.  fontmaking:=1;        % yes, we are making a font
  149.  tracingtitles:=0;     % no, don't show titles in the log
  150.  pixels_per_inch:=196;
  151.  blacker:=0;           % don't make the pens any blacker
  152.  fillin:=0;            % and don't compensate for fillin
  153.  o_correction:=.1;     % but suppress most overshoots
  154.  aspect_ratio:=204/196 % 204 dots/inch `vertically'
  155.  enddef;
  156.  
  157. mode_def hpquiet =     % HP QuietJet (192x192)
  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:=192;
  162.  blacker:=0;           % don't make the pens any blacker
  163.  fillin:=0;            % and don't compensate for fillin
  164.  o_correction:=.1;     % but suppress most overshoots
  165.  enddef;
  166.  
  167. mode_def canonbj =     % Canon Bubble Jet 10ex
  168.  proofing:=0;          % no, we're not making proofs
  169.  fontmaking:=1;        % yes, we are making a font
  170.  tracingtitles:=0;     % no, don't show titles in the log
  171.  pixels_per_inch:=360;
  172.  blacker:=.6;          % Canon BubbleJet engine isn't black enough
  173.  fillin:=.7;           % and we're in need of filling diagonals
  174.  o_correction:=.6;
  175.  enddef;
  176.  
  177.  
  178. %
  179. % Select default mode
  180. %
  181. localfont:=hplaser;
  182.  
  183.  
  184. %
  185. % Here are macros for Xerox-world font info:
  186. %
  187.  
  188. def font_family expr s =  % string s names the font family, e.g., "CMR"
  189.  headerbyte 49: BCPL_string(s,20);
  190.  special "identifier "&s enddef;
  191. def coding_scheme expr s = % string s names the scheme, e.g. "TEX TEXT"
  192.  headerbyte 9: BCPL_string(s,40);
  193.  special "codingscheme "&s enddef;
  194. def font_face_byte expr x = % integer x gives the family member number,
  195.  headerbyte 72: x;          % which should be between 0 and 255
  196.  special "fontfacebyte"; numspecial x enddef;
  197.  
  198. def BCPL_string(expr s,n)= % string s becomes an n-byte BCPL string
  199.  for l:=if length(s)>=n: n-1 else: length(s) fi: l
  200.   for k:=1 upto l: , substring (k-1,k) of s endfor
  201.   for k:=l+2 upto n: , 0 endfor endfor enddef;
  202.  
  203. Xerox_world:=1;    % users can say `if known Xerox_world:...fi'
  204.  
  205. inner end;
  206. def bye=
  207.  if fontmaking>0: font_family font_identifier_;
  208.   coding_scheme font_coding_scheme_;
  209.   font_face_byte max(0,254-round 2designsize); fi
  210.  tracingstats:=1;  % at least for now we want this
  211.  end
  212.  enddef;
  213.  
  214. outer bye,end;
  215.  
  216.  
  217. %
  218. % Patch plain base (kill bugs)
  219. %
  220. % This has been fixed in plain 2.7
  221. %
  222. % def drawdot expr z = if unknown currentpen_path: def_pen_path_ fi
  223. %  addto_currentpicture contour
  224. %   currentpen_path shifted (z.t_) withpen penspeck enddef;
  225. %
  226. %
  227. % This has been fixed in plain 1.7
  228. %
  229. %vardef cutoff(expr z,theta) =
  230. % interim autorounding := 0; interim smoothing := 0;
  231. % addto pic_ doublepath z.t_ withpen currentpen;
  232. % addto pic_ contour
  233. %  (cut_ scaled (1+max(pen_lft,pen_rt,pen_top/aspect_ratio,pen_bot/aspect_ratio))
  234. %   rotated theta shifted z.t_);
  235. % cull pic_ keeping (2,2) withweight -default_wt_;
  236. % addto currentpicture also pic_;
  237. % pic_:=nullpicture enddef;
  238.