diff options
| author | Craig Jennings <c@cjennings.net> | 2024-04-07 13:41:34 -0500 |
|---|---|---|
| committer | Craig Jennings <c@cjennings.net> | 2024-04-07 13:41:34 -0500 |
| commit | 754bbf7a25a8dda49b5d08ef0d0443bbf5af0e36 (patch) | |
| tree | f1190704f78f04a2b0b4c977d20fe96a828377f1 /devdocs/elisp/specified-space.html | |
new repository
Diffstat (limited to 'devdocs/elisp/specified-space.html')
| -rw-r--r-- | devdocs/elisp/specified-space.html | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/devdocs/elisp/specified-space.html b/devdocs/elisp/specified-space.html new file mode 100644 index 00000000..2ac4ecb5 --- /dev/null +++ b/devdocs/elisp/specified-space.html @@ -0,0 +1,11 @@ + <h4 class="subsection">Specified Spaces</h4> <p>To display a space of specified width and/or height, use a display specification of the form <code>(space . <var>props</var>)</code>, where <var>props</var> 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 <em>all</em> of those characters. These are the properties you can use in <var>props</var> to specify the weight of the space: </p> <dl compact> <dt><code>:width <var>width</var></code></dt> <dd> +<p>If <var>width</var> is a number, it specifies that the space width should be <var>width</var> times the normal character width. <var>width</var> can also be a <em>pixel width</em> specification (see <a href="pixel-specification">Pixel Specification</a>). </p> </dd> <dt><code>:relative-width <var>factor</var></code></dt> <dd> +<p>Specifies that the width of the stretch should be computed from the first character in the group of consecutive characters that have the same <code>display</code> property. The space width is the pixel width of that character, multiplied by <var>factor</var>. (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.) </p> </dd> <dt><code>:align-to <var>hpos</var></code></dt> <dd><p>Specifies that the space should be wide enough to reach <var>hpos</var>. If <var>hpos</var> is a number, it is measured in units of the normal character width. <var>hpos</var> can also be a <em>pixel width</em> specification (see <a href="pixel-specification">Pixel Specification</a>). </p></dd> </dl> <p>You should use one and only one of the above properties. You can also specify the height of the space, with these properties: </p> <dl compact> <dt><code>:height <var>height</var></code></dt> <dd> +<p>Specifies the height of the space. If <var>height</var> is a number, it specifies that the space height should be <var>height</var> times the normal character height. The <var>height</var> may also be a <em>pixel height</em> specification (see <a href="pixel-specification">Pixel Specification</a>). </p> </dd> <dt><code>:relative-height <var>factor</var></code></dt> <dd> +<p>Specifies the height of the space, multiplying the ordinary height of the text having this display specification by <var>factor</var>. </p> </dd> <dt><code>:ascent <var>ascent</var></code></dt> <dd> +<p>If the value of <var>ascent</var> is a non-negative number no greater than 100, it specifies that <var>ascent</var> 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 <em>pixel ascent</em> specification (see <a href="pixel-specification">Pixel Specification</a>). </p> </dd> </dl> <p>Don’t use both <code>:height</code> and <code>:relative-height</code> together. </p> <p>The <code>:width</code> and <code>:align-to</code> properties are supported on non-graphic terminals, but the other space properties in this section are not. </p> <p>Note that space properties are treated as paragraph separators for the purposes of reordering bidirectional text for display. See <a href="bidirectional-display">Bidirectional Display</a>, for the details. </p><div class="_attribution"> + <p class="_attribution-p"> + Copyright © 1990-1996, 1998-2022 Free Software Foundation, Inc. <br>Licensed under the GNU GPL license.<br> + <a href="https://www.gnu.org/software/emacs/manual/html_node/elisp/Specified-Space.html" class="_attribution-link">https://www.gnu.org/software/emacs/manual/html_node/elisp/Specified-Space.html</a> + </p> +</div> |
