GDDM V3R2 Base Application Programming Guide
|
Previous topic |
Next topic |
Contents |
Index |
Contact z/OS |
Library |
PDF |
BOOK
Using proportionally-spaced characters GDDM V3R2 Base Application Programming Guide SC33-0867-01 |
|
The maximum width of a mode-3 symbol is the width of the character box. But symbols can be assigned individual widths less than this when the symbol set is created. Symbols that do have individual widths are said to be proportionally spaced. GDDM supplies a number of proportionally-spaced vector symbol sets that you can load into storage and use for graphics text. (See GDDM Base Application Programming Reference book for details.) Alternatively, you can create your own symbol set using the Vector Symbol Editor and assign a width to each character. If a symbol set is not proportionally spaced, a narrow character like an "i" is allocated just as much space as a wide one like a "W". The result is empty space around narrow characters. The advantage of proportionally spaced characters is that GDDM displays them at a spacing that is in proportion to their individual widths. This gives a more pleasing appearance and more compact character strings. The difference is illustrated in Figure 17.
The spacing works as follows. After GSCHAR or GSCHAP has drawn a nonproportionally spaced character, the current position is moved along by an amount equal to the width of the character box. After drawing a proportionally spaced character, the movement is a fraction of the character box width. The fraction is equal to the ratio between the character's assigned width and the maximum, as recorded in the definition of the character. The amount of space occupied by a proportionally spaced character string can be determined by the GSQTB call (see "Outlining the text box around a graphics-text string" in topic 4.4.10). For mode-2 and mode-3 characters, you can also control the amount of space between character boxes, using the character box spacing attribute. |
Copyright IBM Corporation 1990, 2012 |