E.3. Some Examples
Here are a few examples that will, the author hopes, show concretely how the instructions described in the previous section are used.
E.3.1. The 'T' in the Font Courier
Here we have the font Courier v. 4.0d2, which belongs to Apple and Bitstream and is part of the Mac OS X operating system. More precisely, it is the font "Courier with rounded caps", not to be confused with Adobe's Courier font, which is much lighter and has square terminals.
This letter has many points (52!) but few instructions, and those instructions are easy to understand. There are no δ instructions. Below we show the actual code, with no simplification or other changes.
In Figure E-1, the reader can see the letter whose instructions we shall examine. We have indicated the positions of the points that lie on the contour and those of the auxiliary points: the origin (50) and the ending point of the displacement vector (51).
Here are the letter's instructions, as represented by TTX. We have added in comments (C-style, not XML-style, as we are using assembly-language syntax) the numbers that the instructions retrieve from the stack and the values of the reference points rp0, rp1, and rp2 that the instructions leave after their execution. This data turns out to be indispensable for understanding how the instructions work. Here is the complete code; below we shall examine it line by line:
<instructions><assembly> NPUSHB[ ] 28 27 0 49 10 17 13 27 21 18 9 6 0 6 28 24 3 48 28 185 13 228 45 30 ...
Get Fonts & Encodings now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.