diff options
| author | Eli Zaretskii | 2019-11-02 12:41:51 +0200 |
|---|---|---|
| committer | Eli Zaretskii | 2019-11-02 12:41:51 +0200 |
| commit | cacd58463b9265ab737a85cceb502cd8538d3c9b (patch) | |
| tree | 6be37a89f9e8fa33ce07d01816cea8b8b3e4338b /doc/lispref | |
| parent | 5a778d504fdbc4fd729ff2cc80be0ca5a68679b6 (diff) | |
| download | emacs-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.texi | 33 |
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 | |||
| 2466 | objects, font specs, and font entities. @xref{Fontsets}, for | 2466 | objects, font specs, and font entities. @xref{Fontsets}, for |
| 2467 | information about fontsets. | 2467 | information about fontsets. |
| 2468 | 2468 | ||
| 2469 | When 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 | 2470 | When specifying this attribute using @code{set-face-attribute} or |
| 2471 | entity, or a string. Emacs converts such values to an appropriate | 2471 | @code{set-face-font} (@pxref{Attribute Functions}), you may also |
| 2472 | font object, and stores that font object as the actual attribute | 2472 | supply a font spec, a font entity, or a string. Emacs converts such |
| 2473 | value. If you specify a string, the contents of the string should be | 2473 | values to an appropriate font object, and stores that font object as |
| 2474 | a font name (@pxref{Fonts,,, emacs, The GNU Emacs Manual}); if the | 2474 | the actual attribute value. If you specify a string, the contents of |
| 2475 | font name is an XLFD containing wildcards, Emacs chooses the first | 2475 | the string should be a font name (@pxref{Fonts,,, emacs, The GNU Emacs |
| 2476 | font matching those wildcards. Specifying this attribute also changes | 2476 | Manual}); if the font name is an XLFD containing wildcards, Emacs |
| 2477 | the values of the @code{:family}, @code{:foundry}, @code{:width}, | 2477 | chooses the first font matching those wildcards. Specifying this |
| 2478 | @code{:height}, @code{:weight}, and @code{:slant} attributes. | 2478 | attribute 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 |
| 2836 | Change the font-related attributes of @var{face} to those of | 2838 | Change 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 | 2840 | for the supported formats of the @var{font} argument. This function |
| 2839 | @code{:slant}. If @var{frame} is non-@code{nil}, only change the | 2841 | sets the attribute @code{:font} of the face, and indirectly also the |
| 2840 | attributes 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. | ||
| 2844 | If @var{frame} is non-@code{nil}, only change the attributes on the | ||
| 2845 | specified 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 |