METAFONT: The Program

Computers & Typesetting Volume D

Donald E. Knuth

Publisher: Addison-Wesley, 1986, 560 pages

ISBN: 0-201-13438-1

Keywords: Programming

Last modified: March 14, 2022, 11:33 a.m.

This volume contains the fully documented program listing for METAFONT, Donald E. Knuth's revolutionary typeface design language.

Readers interested in software development and in Knuth's programming style will find this a fascinating and instructive case study. Never before has a computer program with this much size and variety been spelled out so clearly and completely. Knuth presents all the algorithms and explains every detail of the METAFONT program, utilizing the WEB system of structured documentation that he developed as part of his TeX research project. METFONT's new algorithms for computer graphics make this program especially interesting; traditional algorithms of parsing and macro expansion are present too, often with new twists. This book is an excellent lesson by example on how to put programming theory into practice.

  1. Introduction
  2. The character set
  3. Input and output
  4. String handling
  5. On-line and off-line printing
  6. Reporting errors
  7. Arithmetic with scaled numbers
  8. Algebraic and transcendental functions
  9. Packed data
  10. Dynamic memory allocation
  11. Memory layout
  12. The command codes
  13. The hash table
  14. Token lists
  15. Data structures for variables
  16. Saving and restoring equivalents
  17. Data structures for paths
  18. Choosing control points
  19. Generating discrete moves
  20. Edge structures
  21. Subdivision into octants
  22. Filling a contour
  23. Polygonal pens
  24. Filling an envelope
  25. Elliptical pens
  26. Direction and intersection times
  27. Online graphic output
  28. Dynamic linear equations
  29. Dynamic nonlinear equations
  30. Introduction to the syntactic routines
  31. Input stacks and states
  32. Maintaining the input stacks
  33. Getting the next token
  34. Scanning macro definitions
  35. Expanding the next token
  36. Conditional processing
  37. Iterations
  38. File names
  39. Introduction to the parsing routines
  40. Parsing primary expressions
  41. Parsing secondary and higher expressions
  42. Doing the operations
  43. Statements and commands
  44. Commands
  45. Font metric data
  46. Generic font file format
  47. Shipping characters out
  48. Dumping and undumping the tables
  49. The main program
  50. Debugging
  51. System-dependent changes
  52. Index

Reviews

METAFONT

Reviewed by Roland Buresund

Mediocre **** (4 out of 10)

Last modified: May 21, 2007, 3:12 a.m.

Commented code to the MetaFont program. A classic.

Comments

There are currently no comments

New Comment

required

required (not published)

optional

required

captcha

required