O'Reilly logo

Fonts & Encodings by Yannis Haralambous

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

E.1. Basic Concepts

We shall briefly review the most important concepts of TrueType instruction: reference points, freedom and projection vectors, the interpreter's stack and the instruction stream, and a few less important concepts such as zones, the cut-in, etc.

E.1.1. Interpreter's Stack, Instruction Stream

Let us begin at the beginning. Just as in the PostScript language, there is a stack for the interpreter, on which the instructions place their arguments to be read by other instructions. But unlike the PostScript language, not everything is placed on this stack systematically. For, alongside the stack, there is also the instruction stream. The instructions themselves are thus not on the interpreter's stack; only the data generated by the commands are found there. But there are also hard-coded data in the font that appear in the instruction stream. There are instructions whose role is to retrieve values from the instruction stream and place them on the interpreter's stack.

We work on a plane containing a number of points: the starting points, control points, and ending points of the Bézier curves, which form the glyph's various contours, and which are given in the font's glyf table, before the section dedicated to TrueType instructions. In this table, we provide each point's coordinates and indicate whether the point lies on the curve or off it—i.e., whether it is a control point.

The task involves modifying the points' coordinates to adapt them to the grid of pixels being ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required