GFONT Procedure

The Space Data Set

Overview: The Space Data Set

As the height (point size) of a font increases, less space is required between letters in relation to their height. If the height decreases, more space might be needed. The space data set tells the GFONT procedure how much to increase or decrease the intercharacter spacing for a given point size. Like kerning, spacing is added to or subtracted from the intercharacter spacing that is specified by the CHARSPACETYPE= option. Spacing is applied uniformly to all characters.
Values that are specified in the space data set are added to the normal intercharacter spacing and any kerning data. Normal intercharacter spacing is determined by the CHARSPACETYPE= option.

Space Data Set Variables

The space data set must contain these variables:
specifies the point size of the font. SIZE is a numeric variable.
specifies the spacing adjustment for the point size in hundredths (1/100) of a point. (A point is equal to 1/72 of an inch.) ADJ is a numeric variable. Positive values for ADJ increase the space between characters. Negative values for ADJ reduce the space between characters.

Creating a Space Data Set

Each observation in a space data set specifies a point size (SIZE) and the amount of space (ADJ) to be added or subtracted between characters when a font of that point size is requested. When you specify a point size that is not in the space data set, the adjustment for the next smaller size is used. To create a space data set, follow these steps:
  1. Determine the amount of adjustment that is required for typical point sizes.
  2. Create a data set that contains the variables SIZE and ADJ. Create one observation for each point size and corresponding space adjustment as follows:
    data space1;
      input size adj;
     6   40
    12    0
    18  -40
    24  -90
    30 -150
    36 -300
    42 -620
  3. Assign the space data set with the SPACEDATA= option as follows:
    proc gfont data=fontdata
Comparison of Text with and without Spacing Adjustments illustrates how to use the SPACEDATA= option to create a font in which intercharacter spacing is adjusted according to the height of the characters. The characters A, D, and T are shown as the word DATA. Each pair of lines displays the word DATA and at the same size uses first the font with spacing adjustment (FONT3) and then the original font (FONT1). Note that as the size of the characters increases, the space between them decreases.
The following TITLE statements are used with the GSLIDE procedure to produce Comparison of Text with and without Spacing Adjustments:
title3 f=font3 h=.25in j=l "DATA"; /* 18 points */
title4 f=font1 h=.25in j=l "DATA";
title6 f=font3 h=.50in j=l "DATA"; /* 36 points */
title7 f=font1 h=.50in j=l "DATA";
title9 f=font3 h=1.0in j=l "DATA"; /* 72 points */
title10 f=font1 h=1.0in j=l "DATA";
Comparison of Text with and without Spacing Adjustments
Comparison of Text with and without Spacing Adjustments