Encoding instances provide some standard encoding resources for PostScript. When a PostScript file is parsed, the characters in a string are really indices into an array of glyph names, which are in turn the keys to entries in a glyph dictionary. Input to a PostScript interpreter is not really characters, but rather character indexes. (The two might be the same, especially for ASCII characters).
So the PostScript interpreter uses a two-step process, as follows: 1. It conceptually maps character codes (integer values) to name objects like /A or /Uacute. This map is known as an "encoding". There are several standard encoding schemes defined in the PostScript standard that each interpreter must know how to handle. Those are provided as Encoding subclasses. 2. The name objects created in step 1 are then used as the key into a dictionary (contained in the Font dictionary) whose values contain the PostScript instructions needed to actually paint the glyph.
|
|