Emacs can display text in several different styles, which are called faces. Each face can specify various face attributes, such as the font, height, weight and slant, the foreground and background color, and underlining or overlining. A face does not have to specify all of these attributes; often it inherits most of them from another face.
On a text-only terminal, not all face attributes are meaningful. Some text-only terminals support inverse video, bold, and underline attributes; some support colors. Text-only terminals generally do not support changing the height, width or font.
Most major modes assign faces to the text automatically through the
work of Font Lock mode. See Font Lock, for more information about
Font Lock mode and syntactic highlighting. You can print the current
buffer with the highlighting that appears on your screen using the
ps-print-buffer-with-faces. See PostScript.
Enriched mode, the mode for editing formatted text, provides commands and menus for specifying faces for text in the buffer. See Format Faces.
To alter the appearance of a face, use the customization buffer.
See Face Customization. You can also use X resources to specify
attributes of any particular face (see Resources). When
displaying a character, any attribute that isn't specified by its face
is taken from the
default face, whose attributes reflect the
default settings of the frame itself.
You can also change the foreground and background colors of a specific face with M-x set-face-foreground and M-x set-face-background. These commands prompt in the minibuffer for a face name and a color name, with completion, and then set that face to use the specified color. See Face Customization, for information about color names. These commands affect the face colors on all frames, both existing and those to be created in the future. These changes do not, however, persist for future Emacs sessions; to make lasting changes, use the customization buffer (see Face Customization).
You can also set foreground and background colors for the current frame only; see Frame Parameters.
Emacs can display variable-width fonts, but some of the Emacs commands that calculate width and indentation do not know how to calculate variable widths. This can sometimes lead to incorrect results when you use variable-width fonts. In particular, indentation commands can give inconsistent results, so we recommend you avoid variable-width fonts, especially for editing program source code.blog comments powered by Disqus