home *** CD-ROM | disk | FTP | other *** search
/ Fresh Fonts 1 / freshfonts1.bin / bbs / programs / amiga / metafont.lha / MF / INPUTS / MANUAL / LOGO.MF < prev    next >
Text File  |  1993-11-28  |  3KB  |  96 lines

  1. % Routines for the METAFONT logo, as found in The METAFONTbook
  2. % (logo10.mf is a typical parameter file)
  3.  
  4. mode_setup;
  5. if unknown slant: slant:=0 else: currenttransform:=
  6.  identity slanted slant yscaled aspect_ratio fi;
  7.  
  8. ygap#:=(ht#/13.5u#)*xgap#;              % vertical adjustment
  9. ho#:=o#;                                % horizontal overshoot
  10. leftstemloc#:=2.5u#+s#;                 % position of left stem
  11. barheight#:=.45ht#;                     % height of bar lines
  12. py#:=.9px#;                             % vertical pen thickness
  13.  
  14. define_pixels(s,u);
  15. define_whole_pixels(xgap);
  16. define_whole_vertical_pixels(ygap);
  17. define_blacker_pixels(px,py);
  18. pickup pencircle xscaled px yscaled py;
  19. logo_pen:=savepen;
  20. define_good_x_pixels(leftstemloc);
  21. define_good_y_pixels(barheight);
  22. define_corrected_pixels(o);
  23. define_horizontal_corrected_pixels(ho);
  24.  
  25. def beginlogochar(expr code, unit_width) =
  26.  beginchar(code,unit_width*u#+2s#,ht#,0);
  27.  pickup logo_pen enddef;
  28.  
  29. def super_half(suffix i,j,k) =
  30.  draw z.i{0,y.j-y.i}
  31.  ... (.8[x.j,x.i],.8[y.i,y.j]){z.j-z.i}
  32.  ... z.j{x.k-x.i,0}
  33.  ... (.8[x.j,x.k],.8[y.k,y.j]){z.k-z.j}
  34.  ... z.k{0,y.k-y.j} enddef;
  35.  
  36. beginlogochar("M",18);
  37. x1=x2=leftstemloc; x4=x5=w-x1; x3=w-x3;
  38. y1=y5; y2=y4; bot y1=-o;
  39. top y2=h+o; y3=y1+ygap;
  40. draw z1--z2--z3--z4--z5;
  41. labels(1,2,3,4,5); endchar;
  42.  
  43. beginlogochar("E",14);
  44. x1=x2=x3=leftstemloc;
  45. x4=x6=w-x1+ho; x5=x4-xgap;
  46. y1=y6; y2=y5; y3=y4;
  47. bot y1=0; top y3=h; y2=barheight;
  48. draw z6--z1--z3--z4; draw z2--z5;
  49. labels(1,2,3,4,5,6); endchar;
  50.  
  51. beginlogochar("T",13);
  52. italcorr ht#*slant + .5u#;
  53. if .5w<>good.x .5w: change_width; fi
  54. lft x1=-eps; x2=w-x1; x3=x4=.5w;
  55. y1=y2=y3; top y1=h; bot y4=-o;
  56. draw z1--z2; draw z3--z4;
  57. labels(1,2,3,4); endchar;
  58.  
  59. beginlogochar("A",15);
  60. x1=.5w; x2=x4=leftstemloc; x3=x5=w-x2;
  61. top y1=h+o; y2=y3=barheight;
  62. bot y4=bot y5=-o;
  63. draw z4--z2--z3--z5; super_half(2,1,3);
  64. labels(1,2,3,4,5); endchar;
  65.  
  66. beginlogochar("F",14);
  67. x1=x2=x3=leftstemloc;
  68. x4=w-x1+ho; x5=x4-xgap;
  69. y2=y5; y3=y4; bot y1=-o;
  70. top y3=h; y2=barheight;
  71. draw z1--z3--z4; draw z2--z5;
  72. labels(1,2,3,4,5); endchar;
  73.  
  74. beginlogochar("O",15);
  75. x1=x4=.5w; top y1=h+o; bot y4=-o;
  76. x2=w-x3=good.x(1.5u+s); y2=y3=barheight;
  77. super_half(2,1,3); super_half(2,4,3);
  78. labels(1,2,3,4); endchar;
  79.  
  80. beginlogochar("N",15);
  81. x1=x2=leftstemloc; x3=x4=x5=w-x1;
  82. bot y1=bot y4=-o;
  83. top y2=top y5=h+o; y3=y4+ygap;
  84. draw z1--z2--z3; draw z4--z5;
  85. labels(1,2,3,4,5); endchar;
  86.  
  87. ligtable "T": "A" kern -.5u#;
  88. ligtable "F": "O" kern -u#;
  89.  
  90. font_quad:=18u#+2s#;
  91. font_normal_space:=6u#+2s#;
  92. font_normal_stretch:=3u#;
  93. font_normal_shrink:=2u#;
  94. font_identifier:="MFLOGO" if slant<>0: & "SL" fi;
  95. font_coding_scheme:="AEFMNOT only";
  96.