Previous Next


                                               409
      SECTION 5.3                                                              Text Objects



      of the ASCII characters left parenthesis (40), right parenthesis (41), and backslash
      (92) must be preceded by a backslash character. All other byte values between 0
      and 255 may be used in a string object. These rules apply to each individual byte
      in a string object, whether the string is interpreted by the text-showing operators
      as single-byte or multiple-byte character codes.

      Strings presented to the text-showing operators may be of any length—even a
      single character code per string—and may be placed on the page in any order.
      The grouping of glyphs into strings has no significance for the display of text.
      Showing multiple glyphs with one invocation of a text-showing operator such as
      Tj produces the same results as showing them with a separate invocation for each
      glyph. However, the performance of text searching (and other text extraction op-
      erations) is significantly better if the text strings are as long as possible and are
      shown in natural reading order.

      Note: In some cases, the text that is extracted can vary depending on the grouping of
      glyphs into strings. See, for example, “Reverse-Order Show Strings” on page 890.


5.3.3 Text Space Details

      As stated in Section 5.3.1, “Text-Positioning Operators,” text is shown in text
      space, which is defined by the combination of the text matrix, Tm , and the text
      state parameters Tfs , Th , and Trise . This determines how text coordinates are
      transformed into user space. Both the glyph’s shape and its displacement (hori-
      zontal or vertical) are interpreted in text space.

      Note: Glyphs are actually defined in glyph space, whose definition varies according
      to the font type as discussed in Section 5.1.3, “Glyph Positioning and Metrics.” Glyph
      coordinates are first transformed from glyph space to text space before being subject-
      ed to the transformations described below.

      The entire transformation from text space to device space can be represented by a
      text rendering matrix, Trm :

                T fs × T h    0    0
      T rm =        0        T fs 0     × T m × CTM
                    0        T rise 1

Previous Next