From: Lars Ingebrigtsen Date: Wed, 1 Dec 2021 16:20:11 +0000 (+0100) Subject: Add new face `variable-pitch-text' X-Git-Tag: emacs-29.0.90~3630^2~12 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=93824a760edb738ad12000dace1958a629d97f7b;p=emacs.git Add new face `variable-pitch-text' * doc/emacs/display.texi (Standard Faces): Mention in. * lisp/faces.el (variable-pitch-text): New face. * lisp/gnus/gnus-art.el (gnus-header): Use it. * lisp/net/shr.el (shr-text): Use it. --- diff --git a/doc/emacs/display.texi b/doc/emacs/display.texi index 0230a2863ad..15cad88d596 100644 --- a/doc/emacs/display.texi +++ b/doc/emacs/display.texi @@ -642,24 +642,41 @@ apply them to specific text when you want the effects they produce. @item default This face is used for ordinary text that doesn't specify any face. Its background color is used as the frame's background color. + @item bold This face uses a bold variant of the default font. + @item italic This face uses an italic variant of the default font. + @item bold-italic This face uses a bold italic variant of the default font. + @item underline This face underlines text. + @item fixed-pitch This face forces use of a fixed-width font. It's reasonable to customize this face to use a different fixed-width font, if you like, but you should not make it a variable-width font. + @item fixed-pitch-serif This face is like @code{fixed-pitch}, except the font has serifs and looks more like traditional typewriting. + @cindex @code{variable-pitch} face @item variable-pitch -This face forces use of a variable-width font. +This face forces use of a variable-width (i.e., proportional) font. +The font size picked for this face matches the font picked for the +default (usually fixed-width) font. + +@item variable-pitch-text +This is like the @code{variable-pitch} face (from which it inherits), +but is slightly larger. A proportional font of the same height as a +monospace font usually appears visually smaller, and can therefore be +harder to read. When displaying longer texts, this face can be a good +choice over the (slightly smaller) @code{variable-pitch} face. + @cindex @code{shadow} face @item shadow This face is used for making the text less noticeable than the surrounding diff --git a/etc/NEWS b/etc/NEWS index e30ad609bc0..7a94052625b 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -75,6 +75,13 @@ time. * Changes in Emacs 29.1 ++++ +** New face 'variable-pitch-text'. +This face is like 'variable-pitch' (from which it inherits), but is +slightly larger, which should help with the visual size differences +between the default, non-proportional font and proportional fonts when +mixed. + +++ ** New face 'mode-line-active'. This inherits from the 'mode-line' face, but is the face actually used diff --git a/lisp/faces.el b/lisp/faces.el index 5ed6bd1766e..9caba3a11be 100644 --- a/lisp/faces.el +++ b/lisp/faces.el @@ -2381,6 +2381,15 @@ If you set `term-file-prefix' to nil, this function does nothing." "The basic variable-pitch face." :group 'basic-faces) +(defface variable-pitch-text + '((t :inherit variable-pitch + :height 1.1)) + "The proportional face used for longer texts. +This is like the `variable-pitch' face, but is slightly bigger by +default." + :version "29.1" + :group 'basic-faces) + (defface shadow '((((class color grayscale) (min-colors 88) (background light)) :foreground "grey50") diff --git a/lisp/gnus/gnus-art.el b/lisp/gnus/gnus-art.el index 554381e2120..07cb68667f6 100644 --- a/lisp/gnus/gnus-art.el +++ b/lisp/gnus/gnus-art.el @@ -769,7 +769,7 @@ Obsolete; use the face `gnus-signature' for customizations instead." :group 'gnus-article-signature) (defface gnus-header - '((t :inherit variable-pitch)) + '((t :inherit variable-pitch-text)) "Base face used for all Gnus header faces. All the other `gnus-header-' faces inherit from this face." :version "29.1" diff --git a/lisp/net/shr.el b/lisp/net/shr.el index d4c7aaf1c87..ee0e8244114 100644 --- a/lisp/net/shr.el +++ b/lisp/net/shr.el @@ -163,7 +163,7 @@ cid: URL as the argument.") (defvar shr-put-image-function #'shr-put-image "Function called to put image and alt string.") -(defface shr-text '((t :inherit variable-pitch)) +(defface shr-text '((t :inherit variable-pitch-text)) "Face used for rendering text." :version "29.1")