Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Mail Systems
Eclipse Documentation

How To Guides
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Problem Solutions
Privacy Policy




57.2.5 Customizing Faces

In addition to variables, some customization groups also include faces. When you show the contents of a group, both the variables and the faces in the group appear in the customization buffer. Here is an example of how a face looks:

     Custom Changed Face:(sample) [Hide Face]
        [State]: STANDARD.
     Face used when the customize item has been changed.
     Parent groups: [Custom Magic Faces]
     Attributes: [ ] Font Family: *
                 [ ] Width: *
                 [ ] Height: *
                 [ ] Weight: *
                 [ ] Slant: *
                 [ ] Underline: *
                 [ ] Overline: *
                 [ ] Strike-through: *
                 [ ] Box around text: *
                 [ ] Inverse-video: *
                 [X] Foreground: white       (sample)
                 [X] Background: blue        (sample)
                 [ ] Stipple: *
                 [ ] Inherit: *

Each face attribute has its own line. The ‘[x]’ button before the attribute name indicates whether the attribute is enabled; ‘[X]’ means that it's enabled, and ‘[ ]’ means that it's disabled. You can enable or disable the attribute by clicking that button. When the attribute is enabled, you can change the attribute value in the usual ways.

For the colors, you can specify a color name (use M-x list-colors-display for a list of them) or a hexadecimal color specification of the form ‘#rrggbb’. (‘#000000’ is black, ‘#ff0000’ is red, ‘#00ff00’ is green, ‘#0000ff’ is blue, and ‘#ffffff’ is white.) On a black-and-white display, the colors you can use for the background are ‘black’, ‘white’, ‘gray’, ‘gray1’, and ‘gray3’. Emacs supports these shades of gray by using background stipple patterns instead of a color.

Setting, saving and resetting a face work like the same operations for variables (see Changing a Variable).

A face can specify different appearances for different types of display. For example, a face can make text red on a color display, but use a bold font on a monochrome display. To specify multiple appearances for a face, select ‘Show all display specs’ in the menu you get from invoking ‘[State]’.

Another more basic way to set the attributes of a specific face is with M-x modify-face. This command reads the name of a face, then reads the attributes one by one. For the color and stipple attributes, the attribute's current value is the default—type just <RET> if you don't want to change that attribute. Type ‘none’ if you want to clear out the attribute.

  Published under the terms of the GNU General Public License Design by Interspire