home *** CD-ROM | disk | FTP | other *** search
/ Fresh Fish 8 / FreshFishVol8-CD1.bin / useful / text / tex / pastex / mf / inputs / cm / olddig.mf < prev    next >
Text File  |  1993-11-28  |  15KB  |  315 lines

  1. % This file contains the ten digits in so-called old style.
  2. % Character codes \0060 through \0071 are generated.
  3.  
  4. cmchar "Oldstyle numeral 0";
  5. beginchar("0",9u#,x_height#,0);
  6. italcorr .7x_height#*slant-max(.2u#,.95u#-.5curve#);
  7. adjust_fit(0,0);
  8. penpos1(vair,90); penpos3(vair,-90); penpos2(curve,180); penpos4(curve,0);
  9. if not monospace: interim superness:=sqrt(more_super*hein_super); fi
  10. x2r=hround max(.7u,1.45u-.5curve);
  11. x4r=w-x2r; x1=x3=.5w; y1r=h+o; y3r=-o;
  12. y2=y4=.5h-vair_corr; y2l:=y4l:=.52h;
  13. penstroke pulled_arc.e(1,2) & pulled_arc.e(2,3)
  14.  & pulled_arc.e(3,4) & pulled_arc.e(4,1) & cycle;  % bowl
  15. penlabels(1,2,3,4); endchar;
  16.  
  17. cmchar "Oldstyle numeral 1";
  18. beginchar("1",9u#,x_height#,0);
  19. italcorr x_height#*slant+.5cap_stem#-4.25u#;
  20. adjust_fit(0,0);
  21. numeric light_stem; light_stem=hround .4[stem',cap_stem'];
  22. pickup tiny.nib;
  23. pos1(light_stem,0); pos2(light_stem,0);
  24. lft x1l=lft x2l=hround(.5(w+.5u)-.5cap_stem'); top y1=h+apex_o; bot y2=0;
  25. filldraw stroke z1e--z2e;  % stem
  26. if not serifs: save slab; slab=bar; fi
  27. dish_serif(2,1,a,1/3,min(2.25u,lft x2l-1.5u),
  28.   b,1/3,min(2.25u,w-1.25u-rt x2r)); % serif
  29. pickup crisp.nib; pos3(slab,-90); pos4(bar,-90);
  30. top y3l=h+apex_o; top y4l=if monospace: .8 else: .9 fi\\ h+apex_o;
  31. lft x4=max(1.25u,tiny.lft x1l-2.35u);
  32. tiny.rt x1r=lft x3+.25[tiny,hair];
  33. erase fill z3l{x4l-x3l,3(y4l-y3l)}...z4l{left}
  34.  --(x4l,h+apex_o+1)--(x3l,h+apex_o+1)--cycle; % erase excess at top
  35. filldraw stroke z3e{x4e-x3e,3(y4e-y3e)}..z4e{left};  % point
  36. penlabels(1,2,3,4); endchar;
  37.  
  38. cmchar "Oldstyle numeral 2";
  39. beginchar("2",9u#,x_height#,0);
  40. italcorr .8x_height#*slant-.4u#;
  41. adjust_fit(0,0);
  42. numeric arm_thickness, hair_vair; hair_vair=.25[vair,hair];
  43. arm_thickness=Vround(if hefty:slab+2stem_corr else:.75[vair,cap_stem] fi);
  44. pickup crisp.nib; pos7(arm_thickness,-90); pos8(hair,0);
  45. bot y7r=0; lft x7=hround .8u; rt x8r=hround(w-.9u); y8=good.y(y7l+beak/3)+eps;
  46. arm(7,8,a,.3beak_darkness,beak_jut);  % arm and beak
  47. pickup fine.nib; pos2(slab,90); pos3(.4[curve,cap_curve],0);
  48. top y2r=h+o; x2=.5(w-.5u); rt x3r=hround(w-.9u); y3+.5vair=.75h;
  49. if serifs: numeric bulb_diam; bulb_diam=hround .8[hair,flare];
  50.  pos0(bulb_diam,180); pos1(cap_hair,180);
  51.  lft x1r=hround u; y1-.5bulb_diam=2/3h;
  52.  (x,y2l)=whatever[z1l,z2r]; x2l:=x; bulb(2,1,0);  % bulb and arc
  53. else: x2l:=x2l-.25u; pos1(flare,angle(-9u,h));
  54.  lft x1r=hround .75u; bot y1l=vround .7h; y1r:=good.y y1r+eps; x1l:=good.x x1l;
  55.  filldraw stroke term.e(2,1,left,.9,4); fi  % terminal and arc
  56. pos4(.25[hair_vair,cap_stem],0);
  57. pos5(hair_vair,0); pos6(hair_vair,0);
  58. y5=arm_thickness; y4=.3[y5,y3]; top y6=min(y5,slab,top y7l);
  59. lft x6l=crisp.lft x7; z4l=whatever[z6l,(x3l,bot .58h)]; z5l=whatever[z6l,z4l];
  60. erase fill z4l--z6l--lft z6l--(lft x6l,y4l)--cycle;  % erase excess at left
  61. filldraw stroke z2e{right}..tension atleast .9 and atleast 1
  62.  ..z3e{down}.. z4e---z5e--z6e;  % stroke
  63. penlabels(0,1,2,3,4,5,6,7,8); endchar;
  64.  
  65. cmchar "Oldstyle numeral 3";
  66. beginchar("3",9u#,x_height#,desc_depth#);
  67. italcorr .8x_height#*slant-.4u#;
  68. adjust_fit(0,0);
  69. numeric top_thickness,mid_thickness,bot_thickness;
  70. top_thickness=max(fine.breadth,vround(slab-2vair_corr));
  71. mid_thickness=max(fine.breadth,vround 2/3vair);
  72. bot_thickness=max(fine.breadth,vround(slab-vair_corr));
  73. pickup fine.nib; pos2(top_thickness,90); top y2r=h+o;
  74. pos3(max(fine.breadth,.6[curve,cap_curve]-stem_corr),0);
  75. rt x3r=hround(w-1.25u);
  76. pos4(vair,-90); pos5(vair,-90);
  77. pos6(mid_thickness,90); x2=x6=x8=.5[1.5u,x7];
  78. pos7(cap_curve,0); rt x7r=hround(w-.75u); lft x5=min(hround 3u,lft x6);
  79. pos8(bot_thickness,-90); bot y8r=-d-o;
  80. y3=.6[top y4l,bot y2l]; y7=.5[bot y6l,top y8l];
  81. top y5l=vround(.54[-d,h]+.5vair); y5r=y6l;
  82. x4=1/3[x5,x3l]; z4=z5+whatever*(150u,h+d);
  83. filldraw stroke pulled_super_arc.e(2,3)(.5superpull)
  84.  & z3e{down}...z4e---z5e;  % upper bowl
  85. filldraw z5r--z6l--z6r--z5l---cycle;  % middle tip
  86. filldraw stroke pulled_super_arc.e(6,7)(.5superpull)
  87.  & pulled_super_arc.e(7,8)(.5superpull);  % lower bowl
  88. if serifs: numeric bulb_diam[];
  89.  bulb_diam1=flare+.5(cap_stem-stem); bulb_diam2=flare+cap_stem-stem;
  90.  pos0(bulb_diam1,180); pos1(hair,180);
  91.  lft x0r=hround 1.25u; y0=min(.9[-d,h]-.5bulb_diam1,.75[-d,h]+.5bulb_diam1);
  92.  bulb(2,1,0);  % upper bulb
  93.  pos10(bulb_diam2,-180); pos9(cap_hair,-180);
  94.  lft x10r=hround .75u; y10=max(.1[-d,h]+.5bulb_diam2,.3[-d,h]-.5bulb_diam2);
  95.  bulb(8,9,10);  % lower bulb
  96. else: pos1(.5[vair,flare],angle(-8u,h+d)); lft x1r=hround u;
  97.  bot y1l=(vround .75[-d,h])+o; y1r:=good.y y1r+eps; x1l:=good.x x1l;
  98.  pos9(bot_thickness,angle(-2u,-h-d));
  99.  lft x9r=hround .75u; top y9l=(vround .25[-d,h])-o;
  100.  y9r:=good.y y9r-eps; x9l:=good.x x9l;
  101.  filldraw stroke term.e(2,1,left,1,4);  % upper terminal
  102.  filldraw stroke term.e(8,9,left,1,4); fi  % lower terminal
  103. penlabels(0,1,2,3,4,5,6,7,8,9,10); endchar;
  104.  
  105. cmchar "Oldstyle numeral 4";
  106. beginchar("4",9u#,x_height#,desc_depth#);
  107. italcorr x_height#*slant+.5stem#-2.5u#;
  108. adjust_fit(0,0);
  109. numeric light_stem, light_stem', diag_stem, alpha, cut; cut=.75notch_cut;
  110. light_stem=hround .4[fudged.stem,fudged.cap_stem];
  111. light_stem'=hround max(tiny.breadth,light_stem-2stem_corr);
  112. diag_stem=max(tiny.breadth,.4[vair,fudged.hair]);
  113. pickup crisp.nib; pos5(cap_bar,90); pos6(cap_bar,90);
  114. lft x5=hround .5u; rt x6=hround(w-.5u); bot y5l=0;
  115. z4l=top lft z5r; y2=y2'=y5=y6; x1r=x2r=hround(w-3u+.5light_stem);
  116. penpos1(light_stem',0); penpos2(light_stem',0); y1=y3=h+apex_o+apex_oo;
  117. x3r+apex_corr=x1r; alpha=diag_ratio(1,diag_stem,y3-y4l,x3r-x4l);
  118. penpos3(alpha*diag_stem,0); penpos4(alpha*diag_stem,0);
  119. x0=x1l; z0=whatever[z3r,z4r];
  120. x5'=x5; z5''=z5'+penoffset z4-z3 of currentpen=whatever[z4l,z3l];
  121. fill diag_end(2r,1r,1,.5,3l,4l)---z5''...lft z5'
  122.  ---lft z5l -- (x4r,y5l) -- z4r
  123.  if y0<h-cut:{z3r-z4r}...{up}(x1l-1,h-cut)
  124.   --(x1l,h-cut) else: -- z0 fi
  125.  --z2l--z2r--cycle;  % diagonal and upper stem
  126. filldraw stroke z5e--z6e;  % bar
  127. pickup tiny.nib; pos7(light_stem,0); pos2'(light_stem,0); x2'=x7;
  128. rt x7r=x1r; bot y7=-d if not serifs:-o fi;
  129. filldraw stroke z2'e--z7e;  % lower stem
  130. if serifs: dish_serif(7,2',a,1/3,1.75u,
  131.   b,1/3,min(1.75u,w-.5u-rt x7r)); fi  % serif
  132. penlabels(0,1,2,3,4,5,6,7); endchar;
  133.  
  134. cmchar "Oldstyle numeral 5";
  135. beginchar("5",9u#,x_height#,desc_depth#);
  136. italcorr x_height#*slant-u#;
  137. adjust_fit(0,0);
  138. numeric bot_thickness,light_hair;
  139. bot_thickness=max(fine.breadth,vround(slab-vair_corr));
  140. light_hair=hround(cap_hair if hefty: -2stem_corr fi);
  141. pickup tiny.nib; pos5(vair,180); pos6(vair,90);
  142. bot y5=vround(.53[-d,h]-vair);
  143. top y6r=max((vround .61803[-d,h])+o,top y6r+y5+eps-y6l);
  144. pos3(light_hair,0); pos4(light_hair,0);
  145. lft x3l=max(1.35u,2.1u-.5light_hair); x3=x4=x5; y4=y5;
  146. top y3=h if not hefty: +o fi;
  147. filldraw stroke z3e--z4e;  % thin stem
  148. penpos7(cap_stem-fine,0); penpos8(bot_thickness-fine,-90);
  149. fine.rt x7r=hround(w-.9u); x8=.5[u,x7]; x6=.5[x5,x7];
  150. erase fill z5--bot z5--(x6,bot y5)--z6{left}
  151.  ..tension .9 and 1..{x5-x6,3(y5-y6)}cycle; % erase excess in middle
  152. filldraw stroke z6e{left}..tension .9 and 1..{x5-x6,3(y5-y6)}z5e;  % link
  153. pickup fine.nib; pos6'(vair,90); z6'=z6;
  154. y7=.5[y6,y8]; bot y8r=-d-o;
  155. filldraw stroke pulled_arc.e(6',7) & pulled_arc.e(7,8);  % bowl
  156. if serifs: pos9(hair,-180); y9=.5[-d,y5]; lft x9r=hround .9u;
  157.  pos10(flare+1/3(cap_stem-stem),-180); bulb(8,9,10);  % bulb
  158. else: pos9(3/7[bot_thickness,flare],angle(-7u,-h-d));
  159.  lft x9r=hround .9u; bot y9r=(vround .15[-d,h])-o;
  160.  x9l:=good.x x9l; y9l:=good.y y9l;
  161.  filldraw stroke term.e(8,9,left,1,4); fi  % terminal
  162. if hefty: pickup crisp.nib; pos1(slab,90); pos2(hair,0);
  163.  top y1r=h; x1=x4; rt x2r=hround(w-1.5u);
  164.  y2=y1l-eps; arm(1,2,a,0,0);  % arm
  165. else: numeric flag_breadth; flag_breadth=7/8[vair,cap_curve];
  166.  pos1(flag_breadth,90); pos2(flag_breadth,60);
  167.  pos0(vair,90); top y1r=tiny.top y3; top y2r=(vround .95[-d,h])+o; y0r=y1r;
  168.  lft x1=tiny.lft x3l; x2r=.5[x1,x0]; rt x0=hround(w-1.6u);
  169.  erase fill top z1r--z1r...{right}z2r
  170.   --(x2r,top y1r)--cycle; % erase excess at top
  171.  filldraw stroke z1e...{right}z2e...z0e; fi  % flag
  172. penlabels(0,1,2,3,4,5,6,7,8,9,10); endchar;
  173.  
  174. cmchar "Oldstyle numeral 6";
  175. beginchar("6",9u#,fig_height#,0);
  176. italcorr fig_height#*slant-u#;
  177. adjust_fit(0,0);
  178. numeric top_thickness,bot_thickness,side_thickness,pull;
  179. top_thickness=max(fine.breadth,vround(slab-2vair_corr));
  180. bot