home *** CD-ROM | disk | FTP | other *** search
/ Fresh Fonts 1 / freshfonts1.bin / bbs / programs / amiga / metafont.lha / MF / INPUTS / MISC / lasychr.mf < prev    next >
Text File  |  1992-09-13  |  15KB  |  380 lines

  1. %
  2. % These characters are taken from LASY.MF by L.Lamport
  3. % with minor changes and extensions (so 100% compatible)
  4. %
  5.  
  6. cmchar "Leftward arrowhead";
  7. compute_spread(.45x_height#,.55x_height#);
  8. beginchar(hex"28",6u#,v_center(spread#+rule_thickness#));
  9. adjust_fit(0,0); pickup crisp.nib;
  10. pos3(bar,0); pos4(bar,0);
  11. y0=math_axis; lft x0=hround u;
  12. y3-y0=y0-y4=.24asc_height+eps; x3=x4=x0+3u+eps;
  13. pos5(bar,angle(z4-z0)); z5l=z0; pos6(bar,angle(z3-z0)); z6l=z0;
  14. z9=.381966[.5[z3,z4],z0];
  15. numeric t[]; path p[];
  16. (t1,t2)=(z4r{z9-z4}..z6r) intersectiontimes (z3r{z9-z3}..z5r);
  17. z10=(z4r{z9-z4}..z6r) intersectionpoint (z3r{z9-z3}..z5r);
  18. filldraw z0..{z4-z9}z4l--subpath (0,t1) of (z4r{z9-z4}..z6r)
  19.  --z10--subpath (t2,0) of (z3r{z9-z3}..z5r)--z3l{z9-z3}..z0 & cycle;
  20.   % arrowhead
  21. penlabels(0,3,4,5,6,9,10); endchar;
  22.  
  23. % This character is an alteration of the leftward arrow
  24. % The tip of the arrowhead rests one unit from left edge, same as left arrow
  25. % Changes:
  26. %   1) deletion of the stem ... points z1,z2 etc
  27. %      The rest of the numbers stay the same, for any referencing
  28. %   2) new intersectinpoint z10 is introduced and path slightly altered
  29. %   3) name, code number and width changed, otherwise essentially the same
  30.  
  31.  
  32.  
  33. cmchar "Rightward arrowhead";
  34. compute_spread(.45x_height#,.55x_height#);
  35. beginchar(hex"29",6u#,v_center(spread#+rule_thickness#));
  36. adjust_fit(0,0); pickup crisp.nib;
  37. pos3(bar,0); pos4(bar,0);
  38. y0=math_axis; rt x0=hround(w-u);
  39. y3-y0=y0-y4=.24asc_height+eps; x3=x4=x0-3u-eps;
  40. pos5(bar,angle(z4-z0)); z5l=z0; pos6(bar,angle(z3-z0)); z6l=z0;
  41. z9=.381966[.5[z3,z4],z0];
  42. numeric t[]; path p[];
  43. (t1,t2)=(z4l{z9-z4}..z6r) intersectiontimes (z3l{z9-z3}..z5r);
  44. z10=(z4l{z9-z4}..z6r) intersectionpoint (z3l{z9-z3}..z5r);
  45. filldraw z0..{z4-z9}z4r--subpath (0,t1) of (z4l{z9-z4}..z6r)
  46.  --z10--subpath (t2,0) of (z3l{z9-z3}..z5r)--z3r{z9-z3}..z0 & cycle;
  47.   % arrowhead
  48. penlabels(0,3,4,5,6,9,10); endchar;
  49.  
  50. % This character is an alteration of the rightward arrow
  51. % The tip of the arrowhead rests one unit from right edge, same as right arrow
  52. % Changes:
  53. %   1) deletion of the stem ... points z1,z2 etc
  54. %      The rest of the numbers stay the same, for any referencing
  55. %   2) new intersectinpoint z10 is introduced and path slightly altered
  56. %   3) name, code number and width changed, otherwise essentially the same
  57.  
  58.  
  59.  
  60. cmchar "Upward arrowhead";
  61. beginchar(hex"2A",9u#,asc_height#,asc_depth#);
  62. italcorr .76asc_height#*slant+.5crisp#-u#;
  63. adjust_fit(0,0); pickup crisp.nib;
  64. pos3(bar,90); pos4(bar,90);
  65. top z0=(.5w,0); x0-x3=x4-x0=3u+eps;
  66. y3=y4=y0-.24asc_height-eps;
  67. pos5(bar,angle(z4-z0)); z5l=z0;
  68. pos6(bar,angle(z3-z0)); z6l=z0;
  69. z9=.381966[.5[z3,z4],z0];
  70. numeric t[]; path p[];
  71. (t1,t2)=(z4l{z9-z4}..z6r) intersectiontimes (z3l{z9-z3}..z5r);
  72. z10=(z4l{z9-z4}..z6r) intersectionpoint (z3l{z9-z3}..z5r);
  73. filldraw z0..{z4-z9}z4r--subpath (0,t1) of (z4l{z9-z4}..z6r)
  74.  --z10--subpath (t2,0) of (z3l{z9-z3}..z5r)--z3r{z9-z3}..z0 & cycle;
  75.   % arrowhead
  76. penlabels(0,3,4,5,6,9,10); endchar;
  77.  
  78. % This character is an alteration of the upward arrow
  79. % The tip of the arrowhead rests on the baseline for reference
  80. % Changes:
  81. %   1) deletion of the stem ... points z1,z2 etc
  82. %      The rest of the numbers stay the same, for any referencing
  83. %   2) point z0 is moved down from the ascender line; the tip touches
  84. %      the baseline
  85. %   3) new intersectinpoint z10 is introduced and path slightly altered
  86. %   4) name and code number changed, otherwise essentially the same
  87.  
  88.  
  89.  
  90. cmchar "Downward arrowhead";
  91. beginchar(hex"2B",9u#,asc_height#,asc_depth#);
  92. adjust_fit(0,0); pickup crisp.nib;
  93. pos3(bar,90); pos4(bar,90);
  94. bot z0=(.5w,0); x0-x3=x4-x0=3u+eps;
  95. y3=y4=y0+.24asc_height+eps;
  96. pos5(bar,angle(z4-z0)); z5l=z0;
  97. pos6(bar,angle(z3-z0)); z6l=z0;
  98. z9=.381966[.5[z3,z4],z0];  % z9 iintroduces curve to arrowhead
  99. numeric t[]; path p[];    %  rather direction{z9-z4} does this
  100. (t1,t2)=(z4r{z9-z4}..z6r) intersectiontimes (z3r{z9-z3}..z5r);
  101. z10=(z4r{z9-z4}..z6r) intersectionpoint (z3r{z9-z3}..z5r);
  102. filldraw z0..{z4-z9}z4l--subpath (0,t1) of (z4r{z9-z4}..z6r)
  103.  --z10--subpath (t2,0) of (z3r{z9-z3}..z5r)--z3l{z9-z3}..z0 & cycle;
  104.   % arrowhead
  105. penlabels(0,3,4,5,6,9,10); endchar;
  106.  
  107. % This character is an alteration of the downward arrow
  108. % The tip of the arrowhead rests on the baseline for reference
  109. % Changes:
  110. %   1) deletion of the stem ... points z1,z2 etc
  111. %      The rest of the numbers stay the same, for any referencing
  112. %   2) point z0 is moved up from the descender line to rest on the baseline
  113. %   3) new intersectinpoint z10 is introduced and path slightly altered
  114. %   4) name and code number changed, otherwise essentially the same
  115.  
  116.  
  117. cmchar "Upside-down Uppercase Greek Omega";
  118. beginchar(hex"30",13u#,cap_height#,0);
  119. italcorr cap_height#*slant-.35u#;  %italcorr .75cap_height#*slant-.5u#;
  120. adjust_fit(0,0);
  121. pickup tiny.nib; pos1(vair,-90); pos2(cap_curve,0);
  122. pos3(vair,0); pos4(cap_curve,180); pos5(vair,180);
  123. x1=.5w; bot y1r=0-o; lft x4r=hround u; y2=y4=1/3h; x2=w-x4;
  124. rt x5l=hround(1/3(w+.5u)+.5hair); top y3=top y5=h; x3=w-x5;
  125. filldraw stroke z3e{down}...{down}z2e
  126.  & pulled_super_arc.e(2,1)(.5superpull)
  127.  & pulled_super_arc.e(1,4)(.5superpull)
  128.  & z4e{up}...{up}z5e;        % bowl
  129. numeric arm_thickness; path p; p=z3{down}...{down}z2;
  130. arm_thickness=Vround(if hefty:slab+2stem_corr else:.75[slab,cap_vstem] fi);
  131. pickup crisp.nib; pos6(arm_thickness,90); pos7(fudged.hair,0);
  132. top y6r=h; x6=x3; rt x7r=hround (w-.8u); y7=good.y(y6l-.5beak)+eps;
  133. (x,y)=p intersectionpoint((0,y6l)--(w+h,y6l)); x6l:=x;
  134. arm(6,7,a,.5beak_darkness,1.2beak_jut);    % right arm and beak
  135. pos8(arm_thickness,90); pos9(fudged.hair,180);
  136. y8=y6; y9=y7; x8+x6=x9+x7=w; x8l:=w-x6l;
  137. arm(8,9,b,.5beak_darkness,-1.2beak_jut);  % left arm and beak
  138. math_fit(0,.5ic#); penlabels(1,2,3,4,5,6,7,8,9); endchar;
  139.  
  140. % This character is taken from the Upper Case Omega of cmr
  141. % Directions and reference points are reversed and flipped
  142. %   pos angles are flipped by 180 degrees
  143. %   vertical values are reversed, up/down directions in the
  144. %     filldraw stroke are reversed
  145. % left strokes same, but changes reference points
  146. % italic correction based on furthest pont of character , so made it
  147. %   full cap_height minus amount for the beak, taken from the cap XI
  148. % I suppose a transformation of paths would have worked also, but this
  149. %   way, limits are maintained better, i think
  150. % w+h instead of just w in intersection to make sure paths do intersect
  151.  
  152. cmchar "Square subset sign";
  153. compute_spread(5/4x_height#,3/2x_height#); % the spread of `$=$'
  154. beginchar(hex"3C",14u#,v_center(spread#+rule_thickness#));
  155. adjust_fit(0,0); pickup rule.nib;
  156. lft x2=hround(1.5u+oo); x1=x4=hround(w-1.5u)+eps; x3=x2;
  157. y1-y4=spread; y2=y1; y3=y4; y1=math_axis+.5spread;
  158. draw z1--z2--z3--z4;  % bars and stem
  159. labels(1,2,3,4); endchar;
  160.  
  161. % This character is an alteration of the square subset or equal to sign
  162. % Changes:
  163. %   1) changed position of y1 to be .5 of the spread above the math_axis
  164. %   2) got rid of lower bar (points z8/z9,etc) and the extra spread#' amount
  165. %      which was used in calculations for the lower bar
  166. %   3) name and code number and height changed, otherwise essentially the same
  167.  
  168. cmchar "Square superset sign";
  169. compute_spread(5/4x_height#,3/2x_height#); % the spread of `$=$'
  170. beginchar(hex"3D",14u#,v_center(spread#+rule_thickness#));
  171. adjust_fit(0,0); pickup rule.nib;
  172. x1=x4=hround 1.5u-eps; rt x2=hround(w-1.5u-oo); x3=x2;
  173. y1-y4=spread; y2=y1; y3=y4; y1=math_axis+.5spread;
  174. draw z1--z2--z3--z4;  % bars and stem
  175. labels(1,2,3,4); endchar;
  176.  
  177. % This character is an alteration of the square superset or equal to sign
  178. % Changes:
  179. %   1) changed position of y1 to be .5 of the spread above the math_axis
  180. %   2) got rid of lower bar (points z8/z9,etc) and the extra spread#' amount
  181. %      which was used in calculations for the lower bar
  182. %   3) name and code number and height changed, otherwise essentially the same
  183.  
  184. cmchar "Diamond";
  185. %beginchar(oct"063",2(.85asc_height#-math_axis#)+2u#,v_center(7u#));
  186. beginchar(hex"33",2(.85asc_height#-math_axis#)+2u#,
  187.           v_center(2(.85asc_height#-math_axis#)));
  188. italcorr math_axis#*slant;
  189. adjust_fit(0,0); pickup rule.nib;
  190. numeric a; a=.85asc_height-math_axis;
  191. x4=x8=good.x .5w; w:=r:=2x4; rt x2=w-lft x6=good.x(x4+a);