Commit aab67529 authored by Eli Zaretskii's avatar Eli Zaretskii

Support ':relative-width' space display spec on text-mode terminals

* src/xdisp.c (produce_stretch_glyph): Support ':relative-width'
space display spec on text-mode terminals, by calling
PRODUCE_GLYPHS instead of x_produce_glyphs.  Remove the HAVE_WINDOW_SYSTEM
guards from the supporting code, as well as the test for a GUI frame.
parent 0a133c70
......@@ -4387,8 +4387,9 @@ width. @var{width} can also be a @dfn{pixel width} specification
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} property. The space width is the pixel width of
that character, multiplied by @var{factor}. This specification is
only supported on graphic terminals.
that character, multiplied by @var{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.)
@item :align-to @var{hpos}
Specifies that the space should be wide enough to reach @var{hpos}.
......@@ -25956,9 +25956,7 @@ produce_stretch_glyph (struct it *it)
zero_width_ok_p = true;
width = (int)tem;
else if (FRAME_WINDOW_P (it->f)
&& (prop = Fplist_get (plist, QCrelative_width), NUMVAL (prop) > 0))
else if (prop = Fplist_get (plist, QCrelative_width), NUMVAL (prop) > 0)
/* Relative width `:relative-width FACTOR' specified and valid.
Compute the width of the characters having the `glyph'
......@@ -25978,10 +25976,9 @@ produce_stretch_glyph (struct it *it)
it2.glyph_row = NULL;
it2.what = IT_CHARACTER;
x_produce_glyphs (&it2);
width = NUMVAL (prop) * it2.pixel_width;
else if ((prop = Fplist_get (plist, QCalign_to), !NILP (prop))
&& calc_pixel_width_or_height (&tem, it, prop, font, true,
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment