Next: Attribute Functions, Previous: Defining Faces, Up: Faces
The effect of using a face is determined by a fixed set of face attributes. This table lists all the face attributes, and what they mean. You can specify more than one face for a given piece of text; Emacs merges the attributes of all the faces to determine how to display the text. See Displaying Faces.
Any attribute in a face can have the value unspecified. This
means the face doesn't specify that attribute. In face merging, when
the first face fails to specify a particular attribute, that means the
next face gets a chance. However, the default face must
specify all attributes.
Some of these font attributes are meaningful only on certain kinds of
displays—if your display cannot handle a certain attribute, the
attribute is ignored. (The attributes :family, :width,
:height, :weight, and :slant correspond to parts of
an X Logical Font Descriptor.)
:family:widthultra-condensed,
extra-condensed, condensed, semi-condensed,
normal, semi-expanded, expanded,
extra-expanded, or ultra-expanded.
:height:weightultra-bold, extra-bold, bold, semi-bold,
normal, semi-light, light, extra-light,
or ultra-light.
On a text-only terminal, any weight greater than normal is displayed as
extra bright, and any weight less than normal is displayed as
half-bright (provided the terminal supports the feature).
:slantitalic, oblique, normal,
reverse-italic, or reverse-oblique.
On a text-only terminal, slanted text is displayed as half-bright, if
the terminal supports the feature.
:foreground:background:inverse-videot (yes) or nil (no).
:stippleThe value can be a string; that should be the name of a file containing
external-format X bitmap data. The file is found in the directories
listed in the variable x-bitmap-file-path.
Alternatively, the value can specify the bitmap directly, with a list
of the form (width height data). Here,
width and height specify the size in pixels, and
data is a string containing the raw bits of the bitmap, row by
row. Each row occupies (width + 7) / 8 consecutive bytes
in the string (which should be a unibyte string for best results).
This means that each row always occupies at least one whole byte.
If the value is nil, that means use no stipple pattern.
Normally you do not need to set the stipple attribute, because it is
used automatically to handle certain shades of gray.
:underlinet, underlining uses the foreground color of the
face. If the value is a string, underlining uses that color. The
value nil means do not underline.
:overline:underline.
:strike-through:underline.
:inherit:boxHere are the possible values of the :box attribute, and what
they mean:
nilt(:line-width width :color color :style style)The value color specifies the color to draw with. The default is the foreground color of the face for simple boxes, and the background color of the face for 3D boxes.
The value style specifies whether to draw a 3D box. If it is
released-button, the box looks like a 3D button that is not being
pressed. If it is pressed-button, the box looks like a 3D button
that is being pressed. If it is nil or omitted, a plain 2D box
is used.
In older versions of Emacs, before :family, :height,
:width, :weight, and :slant existed, these
attributes were used to specify the type face. They are now
semi-obsolete, but they still work:
:font:boldnil value specifies a bold font.
:italicnil value specifies an italic font.
For compatibility, you can still set these “attributes,” even though they are not real face attributes. Here is what that does:
:font:family, :width, :height,
:weight, and :slant attributes according to the font name.
If the value is a pattern with wildcards, the first font that matches
the pattern is used to set these attributes.
:boldnil makes the face bold; nil makes it normal.
This actually works by setting the :weight attribute.
:italicnil makes the face italic; nil makes it normal.
This actually works by setting the :slant attribute.