summaryrefslogtreecommitdiff
path: root/devdocs/elisp/faces.html
blob: 0244bbb5478e39640593db3d184c21900e5b0537 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
 <h3 class="section">Faces</h3>  <p>A <em>face</em> is a collection of graphical attributes for displaying text: font, foreground color, background color, optional underlining, etc. Faces control how Emacs displays text in buffers, as well as other parts of the frame such as the mode line. </p>  <p>One way to represent a face is as a property list of attributes, like <code>(:foreground "red" :weight bold)</code>. Such a list is called an <em>anonymous face</em>. For example, you can assign an anonymous face as the value of the <code>face</code> text property, and Emacs will display the underlying text with the specified attributes. See <a href="special-properties">Special Properties</a>. </p>  <p>More commonly, a face is referred to via a <em>face name</em>: a Lisp symbol associated with a set of face attributes<a id="DOCF25" href="#FOOT25"><sup>25</sup></a>. Named faces are defined using the <code>defface</code> macro (see <a href="defining-faces">Defining Faces</a>). Emacs comes with several standard named faces (see <a href="basic-faces">Basic Faces</a>). </p> <p>Some parts of Emacs require named faces (e.g., the functions documented in <a href="attribute-functions">Attribute Functions</a>). Unless otherwise stated, we will use the term <em>face</em> to refer only to named faces. </p> <dl> <dt id="facep">Function: <strong>facep</strong> <em>object</em>
</dt> <dd><p>This function returns a non-<code>nil</code> value if <var>object</var> is a named face: a Lisp symbol or string which serves as a face name. Otherwise, it returns <code>nil</code>. </p></dd>
</dl> <table class="menu" border="0" cellspacing="0"> <tr>
<td align="left" valign="top">• <a href="face-attributes" accesskey="1">Face Attributes</a>
</td>
<td> </td>
<td align="left" valign="top">What is in a face? </td>
</tr> <tr>
<td align="left" valign="top">• <a href="defining-faces" accesskey="2">Defining Faces</a>
</td>
<td> </td>
<td align="left" valign="top">How to define a face. </td>
</tr> <tr>
<td align="left" valign="top">• <a href="attribute-functions" accesskey="3">Attribute Functions</a>
</td>
<td> </td>
<td align="left" valign="top">Functions to examine and set face attributes. </td>
</tr> <tr>
<td align="left" valign="top">• <a href="displaying-faces" accesskey="4">Displaying Faces</a>
</td>
<td> </td>
<td align="left" valign="top">How Emacs combines the faces specified for a character. </td>
</tr> <tr>
<td align="left" valign="top">• <a href="face-remapping" accesskey="5">Face Remapping</a>
</td>
<td> </td>
<td align="left" valign="top">Remapping faces to alternative definitions. </td>
</tr> <tr>
<td align="left" valign="top">• <a href="face-functions" accesskey="6">Face Functions</a>
</td>
<td> </td>
<td align="left" valign="top">How to define and examine faces. </td>
</tr> <tr>
<td align="left" valign="top">• <a href="auto-faces" accesskey="7">Auto Faces</a>
</td>
<td> </td>
<td align="left" valign="top">Hook for automatic face assignment. </td>
</tr> <tr>
<td align="left" valign="top">• <a href="basic-faces" accesskey="8">Basic Faces</a>
</td>
<td> </td>
<td align="left" valign="top">Faces that are defined by default. </td>
</tr> <tr>
<td align="left" valign="top">• <a href="font-selection" accesskey="9">Font Selection</a>
</td>
<td> </td>
<td align="left" valign="top">Finding the best available font for a face. </td>
</tr> <tr>
<td align="left" valign="top">• <a href="font-lookup">Font Lookup</a>
</td>
<td> </td>
<td align="left" valign="top">Looking up the names of available fonts and information about them. </td>
</tr> <tr>
<td align="left" valign="top">• <a href="fontsets">Fontsets</a>
</td>
<td> </td>
<td align="left" valign="top">A fontset is a collection of fonts that handle a range of character sets. </td>
</tr> <tr>
<td align="left" valign="top">• <a href="low_002dlevel-font">Low-Level Font</a>
</td>
<td> </td>
<td align="left" valign="top">Lisp representation for character display fonts. </td>
</tr> </table><div class="_attribution">
  <p class="_attribution-p">
    Copyright &copy; 1990-1996, 1998-2022 Free Software Foundation, Inc. <br>Licensed under the GNU GPL license.<br>
    <a href="https://www.gnu.org/software/emacs/manual/html_node/elisp/Faces.html" class="_attribution-link">https://www.gnu.org/software/emacs/manual/html_node/elisp/Faces.html</a>
  </p>
</div>