aboutsummaryrefslogtreecommitdiffstats
path: root/doc/lispref
diff options
context:
space:
mode:
authorEli Zaretskii2019-11-02 12:41:51 +0200
committerEli Zaretskii2019-11-02 12:41:51 +0200
commitcacd58463b9265ab737a85cceb502cd8538d3c9b (patch)
tree6be37a89f9e8fa33ce07d01816cea8b8b3e4338b /doc/lispref
parent5a778d504fdbc4fd729ff2cc80be0ca5a68679b6 (diff)
downloademacs-cacd58463b9265ab737a85cceb502cd8538d3c9b.tar.gz
emacs-cacd58463b9265ab737a85cceb502cd8538d3c9b.zip
Improve documentation of 'set-face-font'
* lisp/faces.el (set-face-font): * doc/emacs/frames.texi (Fonts): * doc/lispref/display.texi (Face Attributes) (Attribute Functions): Clarify and correct the documentation of set-face-font and related descriptions of font specifications. (Bug#14647)
Diffstat (limited to 'doc/lispref')
-rw-r--r--doc/lispref/display.texi33
1 files changed, 19 insertions, 14 deletions
diff --git a/doc/lispref/display.texi b/doc/lispref/display.texi
index 29abc0a9f27..95f9cc15a8b 100644
--- a/doc/lispref/display.texi
+++ b/doc/lispref/display.texi
@@ -2466,16 +2466,18 @@ or a fontset. @xref{Low-Level Font}, for information about font
2466objects, font specs, and font entities. @xref{Fontsets}, for 2466objects, font specs, and font entities. @xref{Fontsets}, for
2467information about fontsets. 2467information about fontsets.
2468 2468
2469When specifying this attribute using @code{set-face-attribute} 2469@anchor{face-font-attribute}
2470(@pxref{Attribute Functions}), you may also supply a font spec, a font 2470When specifying this attribute using @code{set-face-attribute} or
2471entity, or a string. Emacs converts such values to an appropriate 2471@code{set-face-font} (@pxref{Attribute Functions}), you may also
2472font object, and stores that font object as the actual attribute 2472supply a font spec, a font entity, or a string. Emacs converts such
2473value. If you specify a string, the contents of the string should be 2473values to an appropriate font object, and stores that font object as
2474a font name (@pxref{Fonts,,, emacs, The GNU Emacs Manual}); if the 2474the actual attribute value. If you specify a string, the contents of
2475font name is an XLFD containing wildcards, Emacs chooses the first 2475the string should be a font name (@pxref{Fonts,,, emacs, The GNU Emacs
2476font matching those wildcards. Specifying this attribute also changes 2476Manual}); if the font name is an XLFD containing wildcards, Emacs
2477the values of the @code{:family}, @code{:foundry}, @code{:width}, 2477chooses the first font matching those wildcards. Specifying this
2478@code{:height}, @code{:weight}, and @code{:slant} attributes. 2478attribute also changes the values of the @code{:family},
2479@code{:foundry}, @code{:width}, @code{:height}, @code{:weight}, and
2480@code{:slant} attributes.
2479 2481
2480@cindex inheritance, for faces 2482@cindex inheritance, for faces
2481@item :inherit 2483@item :inherit
@@ -2834,10 +2836,13 @@ This sets the @code{:stipple} attribute of @var{face} to
2834 2836
2835@deffn Command set-face-font face font &optional frame 2837@deffn Command set-face-font face font &optional frame
2836Change the font-related attributes of @var{face} to those of 2838Change the font-related attributes of @var{face} to those of
2837@var{font} (a string). This sets the attributes @code{:family}, 2839@var{font} (a string or a font object). @xref{face-font-attribute},
2838@code{:foundry}, @code{:width}, @code{:height}, @code{:weight}, and 2840for the supported formats of the @var{font} argument. This function
2839@code{:slant}. If @var{frame} is non-@code{nil}, only change the 2841sets the attribute @code{:font} of the face, and indirectly also the
2840attributes on the specified frame. 2842@code{:family}, @code{:foundry}, @code{:width}, @code{:height},
2843@code{:weight}, and @code{:slant} attributes, as defined by the font.
2844If @var{frame} is non-@code{nil}, only change the attributes on the
2845specified frame.
2841@end deffn 2846@end deffn
2842 2847
2843@defun set-face-bold face bold-p &optional frame 2848@defun set-face-bold face bold-p &optional frame