home *** CD-ROM | disk | FTP | other *** search
/ Fresh Fish 4 / FreshFish_May-June1994.bin / useful / dist / text / tex / pastex / mf / inputs / cyrcsc.mf < prev    next >
Text File  |  1991-07-03  |  7KB  |  174 lines

  1. %% @mffile{
  2. %%     filename="cyrcsc.mf",
  3. %%     version="2.1",
  4. %%     date="30-MAY-1991",
  5. %%     filetype="Metafont: driver",
  6. %%     copyright="Copyright (C) Humanities and Arts Computing Center,
  7. %%            University of Washington;
  8. %%            all rights reserved.  Copying of this file is
  9. %%            authorized only if either:
  10. %%            (1) you make absolutely no changes to your copy
  11. %%                including name; OR
  12. %%            (2) if you do make changes, you first rename it to some
  13. %%                other name.",
  14. %%     author="American Mathematical Society",
  15. %%     address="American Mathematical Society,
  16. %%            Technical Support Group,
  17. %%            P. O. Box 6248,
  18. %%            Providence, RI 02940,
  19. %%            USA",
  20. %%     telephone="401-455-4080 or (in the USA) 800-321-4AMS",
  21. %%     email="Internet: Tech-Support@Math.AMS.com",
  22. %%     codetable="ISO/ASCII",
  23. %%     checksumtype="line count",
  24. %%     checksum="174",
  25. %%     keywords="amsfonts, tex, metafont , cyrillic ",
  26. %%     abstract="This is the driver file for use with 
  27. %%             the cyrillic cap-small-cap font."
  28. %%     }
  29. %
  30. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  31. % Driver for WNCYR Washington Computer Modern Cyrillic
  32.  
  33. font_coding_scheme:=if ligs=0: "TeX typewriter text"
  34.  else: "TeX text without f-ligatures" fi;
  35. spanish_shriek=oct"016"; spanish_query=oct"017";
  36.  
  37. mode_setup; font_setup;
  38.  
  39. def cyrspread = 1.25dot_size enddef;
  40. numeric cyrflwd; cyrflwd=2hair;
  41. numeric cyrflht; cyrflht=4slab;
  42.  
  43. input cyrmax.mf; %input macro file
  44. input cyrilu; % input common shapes
  45. input cyrspu; % and special uppercase forms
  46. input cyrpunc; % and puctuation etc.
  47. input serb; % serbian & other chars
  48. input serbspu;
  49. %input cyrspl;  % and lowercase specials
  50.  
  51.  
  52. font_slant slant; font_x_height x_height#;
  53. if monospace: font_normal_space 9u#; % no stretching or shrinking
  54.  font_quad 18u#;
  55.  font_extra_space 9u#;
  56. else: font_normal_space 6u#+2letter_fit#;
  57.  font_normal_stretch 3u#; font_normal_shrink 2u#;
  58.  font_quad 18u#+4letter_fit#;
  59.  font_extra_space 2u#;
  60. fi
  61.  
  62. %%% fine lower
  63. def lowerfit = -.15u enddef;
  64. def cyrspread = 1.125dot_size enddef;
  65. forsuffixes $= u, width_adj, cap_serif_fit, letter_fit,
  66.  body_height, cap_height, x_height, bar_height, comma_depth,
  67.  flare, cap_hair, stem, cap_stem, cap_curve, cap_ess,
  68.  cap_jut, beak_jut, beak, slab, cap_bar, cap_band, cap_notch_cut,
  69.  o, apex_o:  $.#:=lower.$.#; endfor
  70. fudge:=lower.fudge;
  71. font_setup; % now try again with |lower| settings
  72. extra_endchar:=extra_endchar&"charcode:=charcode+code_offset";
  73. code_offset:=ASCII"a" - ASCII"A";
  74.  
  75. % now input for lowercase of common shapes
  76. input cyrilu;  % majuscules (in lowercase positions)
  77. input cyrspu;  % 'special' uppers not special in small caps
  78.  
  79. code_offset:=8;
  80. input serb;  % serbs and other chars
  81. input serbspu;
  82.  
  83. code_offset:=0;
  84. cmchar "The letter smallcap dotless I";
  85. beginchar(oct"75",14u#+width_adj#,cap_height#+3dot_size#,0);
  86. italcorr cap_height#*slant-cap_serif_fit#+cap_jut#-2.5u#+min(.5cap_stem#,u#);
  87. adjust_fit(cap_serif_fit#,cap_serif_fit#); h:=cap_height;
  88. pickup tiny.nib; pos1(cap_stem,0); pos2(cap_stem,0);
  89. pos3(cap_stem,0); pos4(cap_stem,0);
  90. lft x1l=lft x2l=hround max(2u,3u-.5cap_stem); x3=x4=w-x1;
  91. top y1=top y3=h; bot y2=bot y4=0;
  92. filldraw stroke z1e--z2e; % left stem
  93. filldraw stroke z3e--z4e; % right stem
  94. if serifs: penpos5(.85cap_stem,90); penpos6(.85cap_stem,90); 
  95. else: penpos5(cap_stem,90); penpos6(cap_stem,90); fi
  96. x5=x1r; x6=x3l; if serifs: y5=.1h; y6=.9h; else: bot y5l=0; top y6r=h; fi
  97. fill stroke z5e--z6e;  % bar
  98. if serifs: numeric inner_jut;
  99.  if rt x1r+cap_jut+.5u+1<=lft x3l-cap_jut: inner_jut=cap_jut;
  100.  else: rt x1r+inner_jut+.5u+1=lft x3l-inner_jut; fi
  101.  dish_serif(1,2,a,1/3,cap_jut,b,1/3,inner_jut);  % upper left serif
  102.  dish_serif(2,1,c,1/3,cap_jut,d,1/3,inner_jut); % lower left serif
  103.  dish_serif(3,4,e,1/3,inner_jut,f,1/3,cap_jut);  % upper left serif
  104.  dish_serif(4,3,g,1/3,inner_jut,h,1/3,cap_jut); fi  % lower left serif
  105. x51=.5w; y51=h; h:=body_height+2dot_size; nucyrbrev(51,q);
  106. math_fit(0,.5ic#); penlabels(1,2,3,4,5,6); endchar;
  107.  
  108.  
  109.  
  110.  k#:=-.5u#; kk#:=-1.5u#; kkk#:=-2.5u#; % three degrees of kerning
  111. ligtable "K": "H"=:"H", "h"=:"H",
  112.           oct"021": "H": oct"005" kern k#, oct"025" kern k#,
  113.          "F" kern k#, "O" kern k#, "S" kern k#;
  114. ligtable "T":  "S"=:"C", "s"=:"C",
  115.           oct"024": "G": "U": "A" kern kkk#, 
  116.          "D" kern kkk#, "L" kern kk#, "C" kern kk#, "a" kern kk#,
  117.          "d" kern kk#, "f" kern kk#, "o" kern kk#,
  118.          oct"005" kern kk#, oct"015" kern kk#, oct"025" kern kk#,
  119.          oct"035" kern kk#, "." kern kk#, "," kern kkk#, ";" kern kk#;
  120. ligtable "'": "'"=:oct"042";
  121. ligtable "-": "-"=:oct"173";
  122. ligtable oct"173": "-"=:oct"174";
  123. ligtable "6": "h"=:"W", "H"=:"W";
  124. ligtable "7": "h"=:"w";
  125. ligtable "A": oct"000": oct"001": oct"136": oct"137": oct"024" kern kk#,
  126.           oct"006" kern kk#, oct"007" kern kk#, "Q" kern kk#, oct"137" kern kk#;
  127. ligtable "C": "1"=:oct"007", "H"=:"Q", "h"=:"Q";
  128. ligtable "D": "1"=:oct"006", "2"=:oct"002", "3"=:oct"026",
  129.               "J"=:oct"006", "j"=:oct"006";
  130. ligtable "E": "0"=:oct"023", "1"=:oct"003", "2"=:oct"005";
  131. ligtable "I": "0"=:oct"022", "1"=:oct"004";
  132. ligtable "J": "1"=:oct"027", "2"=:oct"020";
  133. ligtable "L": "1"=:oct"001", "J"=:oct"001", "j"=:oct"001";
  134. ligtable "N": "0"=:oct"175", "1"=:oct"000", "J"=:oct"000", "j"=:oct"000";
  135. ligtable "O": oct"003": "F": "O" kern -k#, "F" kern -k#, oct"005" kern -k#,
  136.           oct"025": "H" kern k#, "A" kern k#, "U" kern k#, oct"024" kern k#,
  137.           "T" kern k#;
  138. ligtable "P": "1"=:oct"136", "2"=:oct"137";
  139. ligtable "t": "s"=:"c",
  140.          "R":  oct"034": "g": "u": oct"035" kern k#,
  141.           "a" kern k#, "d" kern k#, "f" kern k#,
  142.           "l" kern k#, "o" kern k#, oct"035" kern k#,
  143.           "." kern kk#, "," kern kk#, ";" kern kk#;
  144. ligtable "S": "H"=:"X", "h"=:"X";
  145. ligtable "X": "Q"=:"W", "q"=:"W", "C"=:"6", "c"=:"6";
  146. ligtable "Y": "A"=:oct"027", "a"=:oct"027", "U"=:oct"020", "u"=:oct"020";
  147. ligtable "Z": "1"=:oct"021", "H"=:oct"021", "h"=:oct"021";
  148. ligtable "[": "["=:oct"074";
  149. ligtable "]": "]"=:oct"076";
  150. ligtable "`": "`"=:oct"134";
  151. ligtable "e": "0"=:oct"032", "1"=:oct"013", "2"=:oct"015";
  152. % following kerns seem not to actually work out
  153. %         "b": "o": "r": "f": "o" kern -k#, "f" kern -k#, "e" kern -k#,
  154. %          "c" kern -k#, "h" kern k#;
  155. ligtable "c": "1"=:oct"017", "h"=:"q";
  156. ligtable "d": "1"=:oct"016", "2"=:oct"012", "3"=:oct"036", "j"=:oct"016";
  157. ligtable "i": "0"=:oct"033", "1"=:oct"014";
  158. ligtable "j": "1"=:oct"037", "2"=:oct"030";
  159. ligtable "k": "h"=:"h";
  160. ligtable "l": "1"=:oct"011", "j"=:oct"011";
  161. ligtable "n": "1"=:oct"010", "j"=:oct"010";
  162. ligtable "p": "1"=:oct"176", "2"=:oct"177";
  163. ligtable "x": "q"=:"w", "c"=:"7";
  164. ligtable "y": "a"=:oct"037", "u"=:oct"030";
  165. ligtable "z": "1"=:oct"031", "h"=:oct"031";
  166. ligtable "s": "h"=:"x",
  167.               "m": "w": oct"012" kern -k#, oct"032" kern -k#, "c" kern -k#,
  168.               "g" kern -k#, "i" kern -k#, "k" kern -k#, "m" kern -k#,
  169.               "n" kern -k#, "p" kern -k#, "r" kern -k#, "v" kern -k#, "w" kern -k#,
  170.               "x" kern -k#, "y" kern -k#, oct"176" kern -k#, oct"177" kern -k#;
  171.  
  172.  
  173. bye.
  174.