[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

master 93824a7: Add new face `variable-pitch-text'

From: Lars Ingebrigtsen
Subject: master 93824a7: Add new face `variable-pitch-text'
Date: Wed, 1 Dec 2021 11:20:21 -0500 (EST)

branch: master
commit 93824a760edb738ad12000dace1958a629d97f7b
Author: Lars Ingebrigtsen <larsi@gnus.org>
Commit: Lars Ingebrigtsen <larsi@gnus.org>

    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.
 doc/emacs/display.texi | 19 ++++++++++++++++++-
 etc/NEWS               |  7 +++++++
 lisp/faces.el          |  9 +++++++++
 lisp/gnus/gnus-art.el  |  2 +-
 lisp/net/shr.el        |  2 +-
 5 files changed, 36 insertions(+), 3 deletions(-)

diff --git a/doc/emacs/display.texi b/doc/emacs/display.texi
index 0230a28..15cad88 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 e30ad60..7a94052 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -76,6 +76,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
 ** New face 'mode-line-active'.
 This inherits from the 'mode-line' face, but is the face actually used
 on the mode lines (along with 'mode-line-inactive').
diff --git a/lisp/faces.el b/lisp/faces.el
index 5ed6bd1..9caba3a 100644
--- a/lisp/faces.el
+++ b/lisp/faces.el
@@ -2381,6 +2381,15 @@ If you set `term-file-prefix' to nil, this function does 
   "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
+  :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 554381e..07cb686 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 
   :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 d4c7aaf..ee0e824 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")

reply via email to

[Prev in Thread] Current Thread [Next in Thread]