41.16.2 Specified Spaces

To display a space of specified width and/or height, use a display specification of the form (space . props), where props is a property list (a list of alternating properties and values). You can put this property on one or more consecutive characters; a space of the specified height and width is displayed in place of all of those characters. These are the properties you can use in props to specify the weight of the space:

:width width

If width is a number, it specifies that the space width should be width times the normal character width. width can also be a pixel width specification (see Pixel Specification for Spaces).

:relative-width factor

Specifies that the width of the stretch should be computed from the first character in the group of consecutive characters that have the same display property. The space width is the pixel width of that character, multiplied by factor. (On text-mode terminals, the “pixel width” of a character is usually 1, but it could be more for TABs and double-width CJK characters.)

:align-to hpos

Specifies that the space should be wide enough to reach the column hpos. If hpos is a number, it is a column number, and is measured in units of the canonical character width (see Frame Font). hpos can also be a pixel width specification (see Pixel Specification for Spaces). When the current line is wider than the window, and is either displayed by one or more continuation lines, or is truncated and possibly scrolled horizontally (see Horizontal Scrolling), hpos is measured from the beginning of the logical line, not from the visual beginning of the screen line. This way, alignment produced by :align-to is consistent with functions that count columns, such as current-column and move-to-column (see Counting Columns).

You should use one and only one of the above properties. You can also specify the height of the space, with these properties:

:height height

Specifies the height of the space. If height is a number, it specifies that the space height should be height times the normal character height. The height may also be a pixel height specification (see Pixel Specification for Spaces).

:relative-height factor

Specifies the height of the space, multiplying the ordinary height of the text having this display specification by factor.

:ascent ascent

If the value of ascent is a non-negative number no greater than 100, it specifies that ascent percent of the height of the space should be considered as the ascent of the space—that is, the part above the baseline. The ascent may also be specified in pixel units with a pixel ascent specification (see Pixel Specification for Spaces).

Don’t use both :height and :relative-height together.

The :width and :align-to properties are supported on non-graphic terminals, but the other space properties in this section are not.

Note that space properties are treated as paragraph separators for the purposes of reordering bidirectional text for display. See Bidirectional Display, for the details.