Metafont

Metafont is a language employed to compose of the matric police forces.

This language was conceived by Donald Knuth and was belonged to the famous type-setting system TeX. This language includes/understands graphic instructions and its basic syntax resembles that of the languages of the Algol family. A characteristic of Metafont is to give the possibility of defining contours of the characters with powerful geometrical relations; for example, a point can be defined like the intersection of a segment of right-hand side and a Courbe of Bézier. Instructions make it possible to carry out homotheties, rotations, symmetries, translations etc Metafont interprets these instructions placed in a source file of extension .mf and generates a file of image of extension .gf (generic makes) containing the police force and this last can be compressed in a file of extension .pk (packed) using the program GFtoPK . Metafont can also produce a file of extension .tfm (TeX Font Metric) metric information of a police force.

Metafont is generally called without direct request of the user. The files with the format DVI contain only references to the font faces, rather than of the references to the whole of the points or vectors constituting a character, i.e. with its eye. Other formats like PostScript, are not limited to such references. Consequently, the œils must be consulted all the times that a request is made visualize, to print or convert a file DVI. The majority of the distributions of TeX are configured so that, all the inalienable police forces in the resolution required during the treatment, are produced by calls to Metafont. The œils are then stored in files for their later re-use.

In addition, you can employ Metafont to produce any type of graph, and not only of the characters. However, MetaPost is preferred to create advanced illustrations, because it with the possibility of producing of PostScript.

Language of description

Here a small example of Metafont-Logofont: 1: beginlogochar (" F" , 14); 2: x1=x2=x3=leftstemloc; 3: x4=w-x1+ho; x5=x4-xgap; 4: y2=y5; y3=y4; club-footed y1=-o; 5: signal y3=h; y2=barheight; 6: Draw z1--z3--z4; Draw z2--z5; 7: labels (1,2,3,4,5); endchar; First of all, the coordinates of the points which define F, are calculées.
La line 1 defines a new symbol having as name F and like codes 14.
Les X-coordinates of items 1,2 and 3 are initialized with leftstemloc , a value which indicates the position of the line gauche.
La line 3 defines X 4 so that item 4 is with the same distance from the flat rim, that item 1 of the edge gauche.
Dans line 6, items 1,3 and 4 are joined by segments of right-hand side (left vertical segment and higher horizontal segment of F). Then items 2 and 5 are joined (small horizontal line in the medium of F).

References

  • Donald Knuth: Metafont: the Program , Addison-Wesley 1986.
  • Donald Knuth: The MetafontBOOK , Addison-Wesley 1986.
  • Bernard Desgraupes: Metafont: handy guide , Vuibert 1999.
  • Yannis Haralambous, Pig iron and cast iron and codings , O' Reilly, 2004,1012 p.

Random links:Milà put | siglo IV A.C. | Lafresguimont-Saint-Martin | Naled | Five Nations tournament 1924 | District of Yuzhong | Liste_d'auteurs_canadiens