aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard M. Stallman2001-04-26 00:30:15 +0000
committerRichard M. Stallman2001-04-26 00:30:15 +0000
commit0073fd652ef415464546ffd4e2e8944c12cf839c (patch)
treea52b3f4338fe546a311059ce53a020582808bf5e
parent5942fb8023b75e8e631ee8d6148c3aad26567fa1 (diff)
downloademacs-0073fd652ef415464546ffd4e2e8944c12cf839c.tar.gz
emacs-0073fd652ef415464546ffd4e2e8944c12cf839c.zip
Explain better what a face is and what it does.
-rw-r--r--man/display.texi58
1 files changed, 31 insertions, 27 deletions
diff --git a/man/display.texi b/man/display.texi
index 0243ed76acc..67ff1df5886 100644
--- a/man/display.texi
+++ b/man/display.texi
@@ -31,10 +31,10 @@ display it.
31@cindex faces 31@cindex faces
32 32
33 When using Emacs with a window system, you can set up multiple 33 When using Emacs with a window system, you can set up multiple
34styles of displaying characters. Some of the aspects of style that 34styles of displaying characters. Each style is called a @dfn{face}.
35you can control are the type font, the foreground color, the 35Each face can specify various attributes, such as the height, weight
36background color, and whether or not to underline text, and in which 36and slant of the characters, the foreground and background color, and
37color. 37underlining. But it does not have to specify all of them.
38 38
39 Features which rely on text in multiple faces (such as Font Lock mode) 39 Features which rely on text in multiple faces (such as Font Lock mode)
40will also work on non-windowed terminals that can display more than one 40will also work on non-windowed terminals that can display more than one
@@ -44,35 +44,39 @@ MS-DOS display (@pxref{MS-DOS}), and the MS-Windows version invoked with
44the @option{-nw} option. Emacs determines automatically whether the 44the @option{-nw} option. Emacs determines automatically whether the
45terminal has this capability. 45terminal has this capability.
46 46
47 The way you control display style is by defining named @dfn{faces}. 47 You control the appearance of a part of the text in the buffer by
48Each face can specify various attributes, like the type font's height, 48specifying the face or faces to use for it. The style of display used
49weight and slant, foreground and background color, and underlining, 49for any given character is determined by combining the attributes of
50but it does not have to specify all of them. By specifying the face 50all the applicable faces specified for that character. Any attribute
51or faces to use for a given part of the text in the buffer, you 51that isn't specified by these faces is taken from the default face,
52control how that text appears. 52which embodies the default settings of the frame itself.
53
54 The style of display used for a given character in the text is
55determined by combining several faces. Any aspect of the display
56style that isn't specified by overlays or text properties comes from a
57default face which inherits its settings from the frame itself.
58 53
59 Enriched mode, the mode for editing formatted text, includes several 54 Enriched mode, the mode for editing formatted text, includes several
60commands and menus for specifying faces. @xref{Format Faces}, for how 55commands and menus for specifying faces for text in the buffer.
61to specify the font for text in the buffer. @xref{Format Colors}, for 56@xref{Format Faces}, for how to specify the font for text in the
62how to specify the foreground and background color. 57buffer. @xref{Format Colors}, for how to specify the foreground and
63 58background color.
64 To alter the appearance of a face, use the customization buffer.
65@xref{Face Customization}. You can also use X resources to specify
66attributes of particular faces (@pxref{Resources X}).
67 59
68@cindex face colors, setting 60@cindex face colors, setting
69@findex set-face-foreground 61@findex set-face-foreground
70@findex set-face-background 62@findex set-face-background
71 Alternatively, you can change the foreground and background colors 63 To alter the appearance of a face, use the customization buffer.
72of a specific face with @kbd{M-x set-face-foreground} and @kbd{M-x 64@xref{Face Customization}. You can also use X resources to specify
73set-face-background}. These commands prompt in the minibuffer for a 65attributes of particular faces (@pxref{Resources X}). Alternatively,
74face name and a color name, with completion, and then set that face to 66you can change the foreground and background colors of a specific face
75use the specified color. 67with @kbd{M-x set-face-foreground} and @kbd{M-x set-face-background}.
68These commands prompt in the minibuffer for a face name and a color
69name, with completion, and then set that face to use the specified
70color.
71
72 Emacs 21 can correctly display variable-width fonts, but Emacs
73commands that calculate width and indentation do not know how to
74calculate variable widths. This can sometimes lead to incorrect
75results when you use variable-width fonts. In particular, indentation
76commands can give inconsistent results, so we recommend you avoid
77variable-width fonts for editing program source code. Filling will
78sometimes make lines too long or too short. We plan to address these
79issues in future Emacs versions.
76 80
77@findex list-faces-display 81@findex list-faces-display
78 To see what faces are currently defined, and what they look like, type 82 To see what faces are currently defined, and what they look like, type