GDDM-PGF V2R1.3 OPS User's Guide
Previous topic | Next topic | Contents | Contact z/OS | Library | PDF | BOOK


Controlling the space between characters

GDDM-PGF V2R1.3 OPS User's Guide
SC33-1776-00



Text is written character by character, with one character box beginning immediately after the other, as illustrated in Figure 15 in topic 2.4.1.2.

The CSP command controls the character interspacing: the space inserted between consecutive character boxes in a text string. Positive interspace gives a wider text; negative interspace condenses the text.

You can specify up to four values on CSP, relating to the four possible TRC values (0-3). If you don't use TRC codes, only the first value matters.

For example, after executing:


          csp  1mm  -.05m  .2

text written with TRC value 0 has a character interspace of 1mm, text with TRC value 1 has a negative character interspace of 5% of "m" (the width of the character box), and text with TRC value 2 has a character interspace of 0.2.

Note that the characters do not change appearance when you insert character interspace. The character box is affected only by HEIGHT or SIZE.

The following figure illustrates the effect of various CSP values. The text lines were written with symbol set ADMUUKSF. Again, remember that unit m denotes the width of a character box.


    __________________________________________________________________________________ 
   |                                                                                  |
   |                                                                                  |
   |                                                                                  |
   |                                                                                  |
   | PICTURE 13                                                                                 |
   |                                                                                  |
   |                                                                                  |
   |                                                                                  |
   |__________________________________________________________________________________|

Figure 16. Effect of CSP values on text


It makes a difference whether the CSP value is absolute or relative to the character box. In the first case CSP does not change with the character box size, but stays with its absolute value. In the second case CSP is automatically adjusted after the character box:


          1 ...
             )ops size 17mm 10mm
             )ops csp 0.1m
                Hello
                Hello
             )ops size 8.5mm 5mm
                Hello
                Hello
          1 ...

In this example, the four occurrences of "Hello" will show a character interspacing of 10% of the character box width; the first two with a spacing of 1.7mm, the last two with a spacing of 0.85mm.

Note that this is an exception to the rule that a coordinate expression with a unit is evaluated immediately in terms of OPS coordinates. In this case, OPS remembers that the spacing was set relative to the character box.

For tables or tabular data, non-proportional symbol sets can be very practical. They eliminate the need to set up tabs; you can align the columns with your text editor. However, the GDDM non-proportional sets are all very wide in the character box, making them impractical for tables.

Use CSP to squeeze the blank space out of the GDDM non-proportional symbol sets, as shown in Figure 17.


    __________________________________________________________________________________ 
   |                                                                                  |
   |                                                                                  |
   |                                                                                  |
   |                                                                                  |
   | PICTURE 14                                                                                 |
   |                                                                                  |
   |                                                                                  |
   |                                                                                  |
   |__________________________________________________________________________________|

Figure 17. Using CSP with non-proportional symbol sets


Using the DEFAULTS command, you can also set defaults for CSP other than 0:


          defaults csp 0  -.05m

This sets CSP to 0 and -.05m when RESET executes.

Go to the previous page Go to the next page



Copyright IBM Corporation 1990, 2012