summaryrefslogtreecommitdiff
path: root/doc/lispref
diff options
context:
space:
mode:
authorMohsin Kaleem <mohkale@kisara.moe>2023-04-20 22:30:12 +0100
committerEli Zaretskii <eliz@gnu.org>2024-04-27 11:59:15 +0300
commit9f589eb924085a4612f46728e8850073128a2e43 (patch)
treea9ec3868c4f93385488ca954ba66a8c704bfffb8 /doc/lispref
parenta7d51085cf0a6e6d01fa265001d7d6a4bd728ed2 (diff)
downloademacs-9f589eb924085a4612f46728e8850073128a2e43.tar.gz
Add support for colored and styled underlines on tty frames
* src/dispextern.h (face, face_underline_type, syms_of_xfacse) (internal-set-lisp-face-attribute) (gui_supports_face_attributes_p): Add definitions for new underline styles of Double-line, Dots and Dashes. Rename FACE_UNDER_LINE and FACE_UNDER_WAVE to make definitions consistent. Delete tty_underline_p from the face struct and use just underline going forward. Add a flag to check whether styled underlines are available. * lisp/cus-face.el (custom-face-attributes): Add entries for Double-line, Dots and Dashes so they can be set through `customize'. * src/termchar.c (tty_display_info): Add an entry for the escape sequence to set the underline style and color on terminal frames. * src/term.c (init_tty, tty_capable_p, turn_on_face): Read and save the underline style escape sequence from the Smulx termcap (alternatively if the Su flag is set use a default sequence). Allow checking for support of styled underlines in the current terminal frame. Output the necessary escape sequences to activate a styled underline on turn_on_face; this is currently only used for the new special underline styles, a default straight underline will still use the "us" termcap. Output escape sequence to set underline color when set in the face and supported by the tty. Save a default value for this sequence on init_tty when styled underlines are supported. * src/xfaces.c (tty_supports_face_attributes_p, realize_tty_face) (map_tty_color): Assert whether styled underlines are supported by the current terminal on display-supports-face-attributes-p checks. Populate the correct underline style and color in the face spec when realizing a face. Allow map_tty_color to map underline colors alongside foreground and background. The interface of map_tty_color was amended to allow the caller to supply the underline color instead of accessing it through the face attributes. (bug#62994) * src/xterm.c (x_draw_glyph_string): Updated to use renamed FACE_UNDERLINE_SINGLE and FACE_UNDERLINE_WAVE face_underline_type enumerations.
Diffstat (limited to 'doc/lispref')
-rw-r--r--doc/lispref/display.texi15
1 files changed, 9 insertions, 6 deletions
diff --git a/doc/lispref/display.texi b/doc/lispref/display.texi
index fba15578f4f..8425aa23422 100644
--- a/doc/lispref/display.texi
+++ b/doc/lispref/display.texi
@@ -2685,12 +2685,15 @@ Underline in color @var{color}, a string specifying a color.
@var{color} is either a string, or the symbol @code{foreground-color},
meaning the foreground color of the face. Omitting the attribute
@code{:color} means to use the foreground color of the face.
-@var{style} should be a symbol @code{line} or @code{wave}, meaning to
-use a straight or wavy line. Omitting the attribute @code{:style}
-means to use a straight line. @var{position}, if non-@code{nil}, means to
-display the underline at the descent of the text, instead of at the
-baseline level. If it is a number, then it specifies the amount of
-pixels above the descent to display the underline.
+@var{style} is a symbol which sets the line-style to of the underline.
+It should be one of @code{line}, @code{double-line}, @code{wave},
+@code{dots}, or @code{dashes}. GUI frames only support @code{line} and
+@code{wave}. Terminal frames can support all aforementioned underline
+styles. Omitting the attribute @code{:style} means to use a straight
+line. @var{position}, if non-@code{nil}, means to display the underline
+at the descent of the text, instead of at the baseline level. If it is
+a number, then it specifies the amount of pixels above the descent to
+display the underline.
@end table
@cindex overlined text