Previous Next


                                                      407
           SECTION 5.3                                                                  Text Objects



           At the beginning of a text object, Tm is the identity matrix; therefore, the origin of
           text space is initially the same as that of user space. The text-positioning operators,
           described in Table 5.5, alter Tm and thereby control the placement of glyphs that
           are subsequently painted. Also, the text-showing operators, described in Table 5.6
           in the next section, update Tm (by altering its e and f translation components) to
           take into account the horizontal or vertical displacement of each glyph painted as
           well as any character or word-spacing parameters in the text state.

           Additionally, a text object keeps track of a text line matrix, Tlm , which captures
           the value of Tm at the beginning of a line of text. This is convenient for aligning
           evenly spaced lines of text. The text-positioning and text-showing operators read
           and set Tlm on specific occasions mentioned in Tables 5.5 and 5.6.

           Note: The text-positioning operators can appear only within text objects.


  5.3.2 Text-Showing Operators

           The text-showing operators (Table 5.6) show text on the page, repositioning text
           space as they do so. All of the operators interpret the text string and apply the text
           state parameters as described below.

                                     TABLE 5.6 Text-showing operators
OPERANDS       OPERATOR        DESCRIPTION

string         Tj              Show a text string.

string         '               Move to the next line and show a text string. This operator has the same effect as
                               the code
                                  T*
                                  string Tj

aw ac string   "               Move to the next line and show a text string, using aw as the word spacing and ac
                               as the character spacing (setting the corresponding parameters in the text state).
                               aw and ac are numbers expressed in unscaled text space units. This operator has
                               the same effect as the following code:
                                  aw Tw
                                  ac Tc
                                  string '

Previous Next