Add 2007 to copyright years.
[bpt/emacs.git] / man / xresources.texi
CommitLineData
94249313 1@c This is part of the Emacs manual.
b65d8176 2@c Copyright (C) 1987, 1993, 1994, 1995, 1997, 2001, 2002, 2003,
4e6835db 3@c 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
94249313 4@c See file emacs.texi for copying conditions.
b4e112e7 5@node X Resources, Antinews, Emacs Invocation, Top
82f6e63d 6@appendix X Options and Resources
94249313 7
82f6e63d 8 You can customize some X-related aspects of Emacs behavior using X
8c1691d8
JR
9resources, as is usual for programs that use X. On MS-Windows, you
10can customize some of the same aspects using the system registry.
e8fd09cc 11@xref{MS-Windows Registry}. Likewise, Emacs on MacOS Carbon emulates X
2d488bd1 12resources using the Preferences system. @xref{Mac Environment Variables}.
10214524 13
c6aea8f8 14 When Emacs is built using an ``X toolkit'', such as Lucid or
e8fd09cc
JD
15LessTif, you need to use X resources to customize the appearance of
16the widgets, including the menu-bar, scroll-bar, and dialog boxes.
17This is because the libraries that implement these don't provide for
10214524 18customization through Emacs. GTK+ widgets use a separate system of
e8fd09cc
JD
19@ifnottex
20``GTK resources'', which we will also describe.
21@end ifnottex
22@iftex
23``GTK resources.'' In this chapter we describe the most commonly used
24resource specifications. For full documentation, see the online
25manual.
26
27@c Add xref for LessTif/Motif menu resources.
28@end iftex
29
405f4489
RS
30
31@menu
82f6e63d
RS
32* Resources:: Using X resources with Emacs (in general).
33* Table of Resources:: Table of specific X resources that affect Emacs.
34* Face Resources:: X resources for customizing faces.
405f4489
RS
35* Lucid Resources:: X resources for Lucid menus.
36* LessTif Resources:: X resources for LessTif and Motif menus.
488dd4c4 37* GTK resources:: Resources for GTK widgets.
405f4489
RS
38@end menu
39
113c2ede 40@node Resources
94249313
RS
41@appendixsec X Resources
42@cindex resources
4fc31427
RS
43@cindex X resources
44@cindex @file{~/.Xdefaults} file
45@cindex @file{~/.Xresources} file
94249313 46
9b7e4229
RS
47 Programs running under the X Window System organize their user
48options under a hierarchy of classes and resources. You can specify
49default values for these options in your X resources file, usually
02e740dc
DL
50named @file{~/.Xdefaults} or @file{~/.Xresources}.
51If changes in @file{~/.Xdefaults} do not
9b7e4229
RS
52take effect, it is because your X server stores its own list of
53resources; to update them, use the shell command @command{xrdb}---for
54instance, @samp{xrdb ~/.Xdefaults}.
94249313
RS
55
56 Each line in the file specifies a value for one option or for a
57collection of related options, for one program or for several programs
58(optionally even for all programs).
59
60@cindex Registry (MS-Windows)
94249313
RS
61 MS-Windows systems don't support @file{~/.Xdefaults} files, but
62Emacs compiled for Windows looks for X resources in the Windows
eca274b1
RS
63Registry, under the key @samp{HKEY_CURRENT_USER\SOFTWARE\GNU\Emacs}
64and then under the key @samp{HKEY_LOCAL_MACHINE\SOFTWARE\GNU\Emacs}.
de222545 65The menu and scroll bars are native widgets on MS-Windows, so they are
b15fa8b1 66only customizable via the system-wide settings in the Display Control
3eff9df2
RS
67Panel. You can also set resources using the @samp{-xrm} command line
68option (see below.)
94249313 69
e8fd09cc
JD
70@iftex
71 Applications such as Emacs look for resources with specific names
72and their particular meanings. Case distinctions are significant in
73these names. Each resource specification in @file{~/.Xdefaults}
74states the name of the program and the name of the resource. For
75Emacs, the program name is @samp{Emacs}. It looks like this:
c6aea8f8 76
e8fd09cc
JD
77@example
78Emacs.borderWidth: 2
79@end example
80@end iftex
81@ifnottex
94249313
RS
82 Programs define named resources with particular meanings. They also
83define how to group resources into named classes. For instance, in
84Emacs, the @samp{internalBorder} resource controls the width of the
85internal border, and the @samp{borderWidth} resource controls the width
86of the external border. Both of these resources are part of the
87@samp{BorderWidth} class. Case distinctions are significant in these
88names.
89
10214524
RS
90 Every resource definition is associated with a specific program
91name---the name of the executable file that you ran. For Emacs, that
92is normally @samp{emacs}. To specify a definition for all instances
93of Emacs, regardless of their names, use @samp{Emacs}.
94
94249313
RS
95 In @file{~/.Xdefaults}, you can specify a value for a single resource
96on one line, like this:
97
98@example
99emacs.borderWidth: 2
100@end example
101
102@noindent
103Or you can use a class name to specify the same value for all resources
104in that class. Here's an example:
105
106@example
107emacs.BorderWidth: 2
108@end example
109
110 If you specify a value for a class, it becomes the default for all
111resources in that class. You can specify values for individual
112resources as well; these override the class value, for those particular
113resources. Thus, this example specifies 2 as the default width for all
114borders, but overrides this value with 4 for the external border:
115
116@example
117emacs.BorderWidth: 2
118emacs.borderWidth: 4
119@end example
e8fd09cc 120@end ifnottex
94249313
RS
121
122 The order in which the lines appear in the file does not matter.
123Also, command-line options always override the X resources file.
e8fd09cc
JD
124
125@ifnottex
10214524
RS
126Here is a list of X command-line options and their corresponding
127resource names.
94249313
RS
128
129@table @samp
130@item -name @var{name}
131@opindex --name
132@itemx --name=@var{name}
133@cindex resource name, command-line argument
134Use @var{name} as the resource name (and the title) for the initial
135Emacs frame. This option does not affect subsequent frames, but Lisp
136programs can specify frame names when they create frames.
137
138If you don't specify this option, the default is to use the Emacs
139executable's name as the resource name.
140
141@item -xrm @var{resource-values}
142@opindex --xrm
143@itemx --xrm=@var{resource-values}
144@cindex resource values, command-line argument
145Specify X resource values for this Emacs job (see below).
146@end table
147
148 For consistency, @samp{-name} also specifies the name to use for
149other resource values that do not belong to any particular frame.
150
151 The resources that name Emacs invocations also belong to a class; its
152name is @samp{Emacs}. If you write @samp{Emacs} instead of
153@samp{emacs}, the resource applies to all frames in all Emacs jobs,
154regardless of frame titles and regardless of the name of the executable
155file. Here is an example:
156
157@example
158Emacs.BorderWidth: 2
159Emacs.borderWidth: 4
160@end example
161
162 You can specify a string of additional resource values for Emacs to
163use with the command line option @samp{-xrm @var{resources}}. The text
164@var{resources} should have the same format that you would use inside a file
165of X resources. To include multiple resource specifications in
166@var{resources}, put a newline between them, just as you would in a file.
167You can also use @samp{#include "@var{filename}"} to include a file full
168of resource specifications. Resource values specified with @samp{-xrm}
169take precedence over all other resource specifications.
170
82f6e63d
RS
171 One way to experiment with the effect of different resource settings
172is to use the @code{editres} program. Select @samp{Get Tree} from the
e8fd09cc
JD
173@end ifnottex
174@iftex
175 You can experiment with the effect of different resource settings
176with the @code{editres} program. Select @samp{Get Tree} from the
177@end iftex
82f6e63d
RS
178@samp{Commands} menu, then click on an Emacs frame. This will display
179a tree showing the structure of X toolkit widgets used in an Emacs
180frame. Select one of them, such as @samp{menubar}, then select
181@samp{Show Resource Box} from the @samp{Commands} menu. This displays
e8fd09cc
JD
182a list of all the meaningful X resources for that widget, and allows
183you to edit them. Changes take effect when you click on the
184@samp{Apply} button. (See the @code{editres} man page for more
185details.)
82f6e63d
RS
186
187@node Table of Resources
188@appendixsec Table of X Resources for Emacs
189
190 This table lists the resource names that designate options for
9b7e4229
RS
191Emacs, not counting those for the appearance of the menu bar, each
192with the class that it belongs to:
94249313
RS
193
194@table @asis
195@item @code{background} (class @code{Background})
196Background color name.
197
e8fd09cc 198@ifnottex
94249313
RS
199@item @code{bitmapIcon} (class @code{BitmapIcon})
200Use a bitmap icon (a picture of a gnu) if @samp{on}, let the window
201manager choose an icon if @samp{off}.
e8fd09cc 202@end ifnottex
94249313
RS
203
204@item @code{borderColor} (class @code{BorderColor})
205Color name for the external border.
206
e8fd09cc 207@ifnottex
94249313
RS
208@item @code{borderWidth} (class @code{BorderWidth})
209Width in pixels of the external border.
e8fd09cc 210@end ifnottex
94249313
RS
211
212@item @code{cursorColor} (class @code{Foreground})
213Color name for text cursor (point).
214
e8fd09cc 215@ifnottex
ed0fb1f1
JD
216@item @code{cursorBlink} (class @code{CursorBlink})
217Specifies whether to make the cursor blink. The default is @samp{on}. Use
218@samp{off} or @samp{false} to turn cursor blinking off.
e8fd09cc 219@end ifnottex
ed0fb1f1 220
94249313 221@item @code{font} (class @code{Font})
e8fd09cc 222Font name (or fontset name, @pxref{Fontsets}) for @code{default} font.
94249313
RS
223
224@item @code{foreground} (class @code{Foreground})
225Color name for text.
226
227@item @code{geometry} (class @code{Geometry})
228Window size and position. Be careful not to specify this resource as
229@samp{emacs*geometry}, because that may affect individual menus as well
230as the Emacs frame itself.
231
232If this resource specifies a position, that position applies only to the
233initial Emacs frame (or, in the case of a resource for a specific frame
234name, only that frame). However, the size, if specified here, applies to
235all frames.
236
e8fd09cc 237@ifnottex
e1556251 238@item @code{fullscreen} (class @code{Fullscreen})
cf225974
EZ
239The desired fullscreen size. The value can be one of @code{fullboth},
240@code{fullwidth} or @code{fullheight}, which correspond to
241the command-line options @samp{-fs}, @samp{-fw}, and @samp{-fh}
242(@pxref{Window Size X}).
e1556251 243
e8fd09cc
JD
244Note that this applies to the initial frame only.
245@end ifnottex
e1556251 246
94249313
RS
247@item @code{iconName} (class @code{Title})
248Name to display in the icon.
249
250@item @code{internalBorder} (class @code{BorderWidth})
251Width in pixels of the internal border.
252
253@item @code{lineSpacing} (class @code{LineSpacing})
254@cindex line spacing
255@cindex leading
256Additional space (@dfn{leading}) between lines, in pixels.
257
258@item @code{menuBar} (class @code{MenuBar})
d90a6f50 259@cindex menu bar
e8fd09cc
JD
260Give frames menu bars if @samp{on}; don't have menu bars if @samp{off}.
261@ifnottex
262@xref{Lucid Resources}, and @ref{LessTif Resources},
263@end ifnottex
264@iftex
265@xref{Lucid Resources},
266@end iftex
267for how to control the appearance of the menu bar if you have one.
94249313 268
e8fd09cc 269@ifnottex
94249313
RS
270@item @code{minibuffer} (class @code{Minibuffer})
271If @samp{none}, don't make a minibuffer in this frame.
272It will use a separate minibuffer frame instead.
273
274@item @code{paneFont} (class @code{Font})
275@cindex font for menus
276Font name for menu pane titles, in non-toolkit versions of Emacs.
e8fd09cc 277@end ifnottex
94249313
RS
278
279@item @code{pointerColor} (class @code{Foreground})
280Color of the mouse cursor.
281
e8fd09cc 282@ifnottex
94249313
RS
283@item @code{privateColormap} (class @code{PrivateColormap})
284If @samp{on}, use a private color map, in the case where the ``default
285visual'' of class PseudoColor and Emacs is using it.
94249313
RS
286
287@item @code{reverseVideo} (class @code{ReverseVideo})
288Switch foreground and background default colors if @samp{on}, use colors as
289specified if @samp{off}.
e8fd09cc 290@end ifnottex
94249313
RS
291
292@item @code{screenGamma} (class @code{ScreenGamma})
293@cindex gamma correction
294Gamma correction for colors, equivalent to the frame parameter
295@code{screen-gamma}.
296
73271565
JD
297@item @code{scrollBarWidth} (class @code{ScrollBarWidth})
298@cindex scrollbar width
299The scroll bar width in pixels, equivalent to the frame parameter
300@code{scroll-bar-width}.
301
e8fd09cc 302@ifnottex
02e740dc 303@item @code{selectionFont} (class @code{SelectionFont})
94249313
RS
304Font name for pop-up menu items, in non-toolkit versions of Emacs. (For
305toolkit versions, see @ref{Lucid Resources}, also see @ref{LessTif
306Resources}.)
307
02e740dc
DL
308@item @code{selectionTimeout} (class @code{SelectionTimeout})
309Number of milliseconds to wait for a selection reply.
310If the selection owner doesn't reply in this time, we give up.
311A value of 0 means wait as long as necessary.
312
94249313
RS
313@item @code{synchronous} (class @code{Synchronous})
314@cindex debugging X problems
315@cindex synchronous X mode
316Run Emacs in synchronous mode if @samp{on}. Synchronous mode is
317useful for debugging X problems.
e8fd09cc 318@end ifnottex
94249313
RS
319
320@item @code{title} (class @code{Title})
321Name to display in the title bar of the initial Emacs frame.
322
4fc31427 323@item @code{toolBar} (class @code{ToolBar})
d90a6f50 324@cindex tool bar
4fc31427
RS
325Number of lines to reserve for the tool bar. A zero value suppresses
326the tool bar. If the value is non-zero and
327@code{auto-resize-tool-bars} is non-@code{nil}, the tool bar's size
328will be changed automatically so that all tool bar items are visible.
c6aea8f8
KS
329 If the value of @code{auto-resize-tool-bars} is @code{grow-only},
330the tool bar expands automatically, but does not contract automatically.
331To contract the tool bar, you must redraw the frame by entering @kbd{C-l}.
4fc31427 332
d90a6f50
DL
333@item @code{useXIM} (class @code{UseXIM})
334@cindex XIM
335@cindex X input methods
336@cindex input methods, X
337Turn off use of X input methods (XIM) if @samp{false} or @samp{off}.
338This is only relevant if your Emacs is actually built with XIM
339support. It is potentially useful to turn off XIM for efficiency,
340especially slow X client/server links.
341
94249313
RS
342@item @code{verticalScrollBars} (class @code{ScrollBars})
343Give frames scroll bars if @samp{on}; don't have scroll bars if
344@samp{off}.
10214524 345
e8fd09cc 346@ifnottex
10214524
RS
347@item @code{visualClass} (class @code{VisualClass})
348Specify the ``visual'' that X should use. This tells X how to handle
349colors.
350
351The value should start with one of @samp{TrueColor},
352@samp{PseudoColor}, @samp{DirectColor}, @samp{StaticColor},
353@samp{GrayScale}, and @samp{StaticGray}, followed by
354@samp{-@var{depth}}, where @var{depth} is the number of color planes.
355Most terminals only allow a few ``visuals,'' and the @samp{dpyinfo}
356program outputs information saying which ones.
e8fd09cc 357@end ifnottex
94249313
RS
358@end table
359
82f6e63d
RS
360@node Face Resources
361@appendixsec X Resources for Faces
362
6bdbc023 363 You can use resources to customize the appearance of particular
82f6e63d 364faces (@pxref{Faces}):
94249313
RS
365
366@table @code
94249313
RS
367@item @var{face}.attributeForeground
368Foreground color for face @var{face}.
369@item @var{face}.attributeBackground
370Background color for face @var{face}.
371@item @var{face}.attributeUnderline
372Underline flag for face @var{face}. Use @samp{on} or @samp{true} for
373yes.
6bdbc023
RS
374@item @var{face}.attributeStrikeThrough
375@itemx @var{face}.attributeOverline
376@itemx @var{face}.attributeBox
377@itemx @var{face}.attributeInverse
378Likewise, for other boolean font attributes.
379@item @var{face}.attributeStipple
380The name of a pixmap data file to use for the stipple pattern, or
381@code{false} to not use stipple for the face @var{face}.
382@item @var{face}.attributeBackgroundPixmap
383The background pixmap for the face @var{face}. Should be a name of a
384pixmap file or @code{false}.
385@item @var{face}.attributeFont
386Font name (full XFD name or valid X abbreviation) for face @var{face}.
387Instead of this, you can specify the font through separate attributes.
388@end table
389
390 Instead of using @code{attributeFont} to specify a font name, you can
391select a font through these separate attributes:
392
393@table @code
94249313
RS
394@item @var{face}.attributeFamily
395Font family for face @var{face}.
94249313
RS
396@item @var{face}.attributeHeight
397Height of the font to use for face @var{face}: either an integer
398specifying the height in units of 1/10@dmn{pt}, or a floating point
399number that specifies a scale factor to scale the underlying face's
400default font, or a function to be called with the default height which
401will return a new height.
6bdbc023
RS
402@item @var{face}.attributeWidth
403@itemx @var{face}.attributeWeight
404@itemx @var{face}.attributeSlant
405Each of these resources corresponds to a like-named font attribute,
406and you write the resource value the same as the symbol you would use
407for the font attribute value.
94249313 408@item @var{face}.attributeBold
6bdbc023
RS
409Bold flag for face @var{face}---instead of @code{attributeWeight}. Use @samp{on} or @samp{true} for
410yes.
94249313 411@item @var{face}.attributeItalic
6bdbc023 412Italic flag for face @var{face}---instead of @code{attributeSlant}.
94249313
RS
413@end table
414
415@node Lucid Resources
416@appendixsec Lucid Menu X Resources
417@cindex Menu X Resources (Lucid widgets)
418@cindex Lucid Widget X Resources
419
e8fd09cc 420@ifnottex
94249313
RS
421 If the Emacs installed at your site was built to use the X toolkit
422with the Lucid menu widgets, then the menu bar is a separate widget and
423has its own resources. The resource names contain @samp{pane.menubar}
424(following, as always, the name of the Emacs invocation, or @samp{Emacs},
425which stands for all Emacs invocations). Specify them like this:
426
427@example
428Emacs.pane.menubar.@var{resource}: @var{value}
429@end example
430
431@noindent
432For example, to specify the font @samp{8x16} for the menu-bar items,
433write this:
e8fd09cc
JD
434@end ifnottex
435@iftex
436 If the Emacs installed at your site was built to use the X toolkit
437with the Lucid menu widgets, then the menu bar is a separate widget
438and has its own resources. The resource specifications start with
439@samp{Emacs.pane.menubar}---for instance, to specify the font
440@samp{8x16} for the menu-bar items, write this:
441@end iftex
94249313
RS
442
443@example
444Emacs.pane.menubar.font: 8x16
445@end example
446
447@noindent
448Resources for @emph{non-menubar} toolkit pop-up menus have
c6aea8f8 449@samp{menu*} instead of @samp{pane.menubar}. For example, to specify
e8fd09cc 450the font @samp{8x16} for the pop-up menu items, write this:
94249313
RS
451
452@example
453Emacs.menu*.font: 8x16
454@end example
455
456@noindent
e8fd09cc 457For dialog boxes, use @samp{dialog*}:
94249313
RS
458
459@example
460Emacs.dialog*.font: 8x16
461@end example
462
0d0e15c3 463@noindent
e8fd09cc
JD
464The Lucid menus can display multilingual text in your locale. For
465more information about fontsets see the man page for
466@code{XCreateFontSet}. To enable multilingual menu text you specify a
467@code{fontSet} resource instead of the font resource. If both
468@code{font} and @code{fontSet} resources are specified, the
469@code{fontSet} resource is used.
470
471 Thus, to specify @samp{-*-helvetica-medium-r-*--*-120-*-*-*-*-*-*,*}
472for both the popup and menu bar menus, write this:
0d0e15c3
JD
473
474@example
e8fd09cc 475Emacs*menu*fontSet: -*-helvetica-medium-r-*--*-120-*-*-*-*-*-*,*
0d0e15c3
JD
476@end example
477
94249313 478@noindent
e8fd09cc
JD
479The @samp{*menu*} as a wildcard matches @samp{pane.menubar} and
480@samp{menu@dots{}}.
481
94249313
RS
482Experience shows that on some systems you may need to add
483@samp{shell.}@: before the @samp{pane.menubar} or @samp{menu*}. On
e8fd09cc
JD
484some other systems, you must not add @samp{shell.}. The generic wildcard
485approach should work on both kinds of systems.
94249313
RS
486
487 Here is a list of the specific resources for menu bars and pop-up menus:
488
489@table @code
490@item font
491Font for menu item text.
0d0e15c3
JD
492@item fontSet
493Fontset for menu item text.
94249313
RS
494@item foreground
495Color of the foreground.
496@item background
497Color of the background.
498@item buttonForeground
499In the menu bar, the color of the foreground for a selected item.
e8fd09cc 500@ifnottex
94249313
RS
501@item horizontalSpacing
502Horizontal spacing in pixels between items. Default is 3.
503@item verticalSpacing
f2daf7e9 504Vertical spacing in pixels between items. Default is 2.
94249313
RS
505@item arrowSpacing
506Horizontal spacing between the arrow (which indicates a submenu) and
507the associated text. Default is 10.
508@item shadowThickness
f2daf7e9
LT
509Thickness of shadow line around the widget. Default is 1.
510
511Also determines the thickness of shadow lines around other objects,
512for instance 3D buttons and arrows. If you have the impression that
513the arrows in the menus do not stand out clearly enough or that the
514difference between ``in'' and ``out'' buttons is difficult to see, set
515this to 2. If you have no problems with visibility, the default
516probably looks better. The background color may also have some effect
517on the contrast.
e8fd09cc 518@end ifnottex
94249313 519@item margin
f2daf7e9 520The margin of the menu bar, in characters. Default is 1.
94249313
RS
521@end table
522
e8fd09cc 523@ifnottex
94249313
RS
524@node LessTif Resources
525@appendixsec LessTif Menu X Resources
526@cindex Menu X Resources (LessTif widgets)
527@cindex LessTif Widget X Resources
528
529 If the Emacs installed at your site was built to use the X toolkit
530with the LessTif or Motif widgets, then the menu bar, the dialog
531boxes, the pop-up menus, and the file-selection box are separate
532widgets and have their own resources.
533
534 The resource names for the menu bar contain @samp{pane.menubar}
535(following, as always, the name of the Emacs invocation, or
536@samp{Emacs}, which stands for all Emacs invocations). Specify them
537like this:
538
539@smallexample
540Emacs.pane.menubar.@var{subwidget}.@var{resource}: @var{value}
541@end smallexample
542
543 Each individual string in the menu bar is a subwidget; the subwidget's
544name is the same as the menu item string. For example, the word
545@samp{File} in the menu bar is part of a subwidget named
546@samp{emacs.pane.menubar.File}. Most likely, you want to specify the
547same resources for the whole menu bar. To do this, use @samp{*} instead
548of a specific subwidget name. For example, to specify the font
549@samp{8x16} for the menu-bar items, write this:
550
551@smallexample
552Emacs.pane.menubar.*.fontList: 8x16
553@end smallexample
554
555@noindent
556This also specifies the resource value for submenus.
557
558 Each item in a submenu in the menu bar also has its own name for X
559resources; for example, the @samp{File} submenu has an item named
560@samp{Save (current buffer)}. A resource specification for a submenu
561item looks like this:
562
563@smallexample
564Emacs.pane.menubar.popup_*.@var{menu}.@var{item}.@var{resource}: @var{value}
565@end smallexample
566
567@noindent
568For example, here's how to specify the font for the @samp{Save (current
569buffer)} item:
570
571@smallexample
572Emacs.pane.menubar.popup_*.File.Save (current buffer).fontList: 8x16
573@end smallexample
574
575@noindent
576For an item in a second-level submenu, such as @samp{Complete Word}
577under @samp{Spell Checking} under @samp{Tools}, the resource fits this
578template:
579
580@smallexample
581Emacs.pane.menubar.popup_*.popup_*.@var{menu}.@var{resource}: @var{value}
582@end smallexample
583
584@noindent
585For example,
586
587@smallexample
588Emacs.pane.menubar.popup_*.popup_*.Spell Checking.Complete Word: @var{value}
589@end smallexample
590
591@noindent
592(This should be one long line.)
177c0ea7 593
94249313
RS
594 It's impossible to specify a resource for all the menu-bar items
595without also specifying it for the submenus as well. So if you want the
596submenu items to look different from the menu bar itself, you must ask
597for that in two steps. First, specify the resource for all of them;
598then, override the value for submenus alone. Here is an example:
599
600@smallexample
601Emacs.pane.menubar.*.fontList: 8x16
602Emacs.pane.menubar.popup_*.fontList: 8x16
603@end smallexample
604
605@noindent
606For LessTif pop-up menus, use @samp{menu*} instead of
607@samp{pane.menubar}. For example, to specify the font @samp{8x16} for
608the pop-up menu items, write this:
609
610@smallexample
611Emacs.menu*.fontList: 8x16
612@end smallexample
613
614@noindent
615For LessTif dialog boxes, use @samp{dialog} instead of @samp{menu}:
616
617@example
618Emacs.dialog*.fontList: 8x16
619Emacs.dialog*.foreground: hotpink
620@end example
621
622To specify resources for the LessTif file-selection box, use
623@samp{fsb*}, like this:
624
625@example
626Emacs.fsb*.fontList: 8x16
627@end example
628
629@iftex
630@medbreak
631@end iftex
632 Here is a list of the specific resources for LessTif menu bars and
633pop-up menus:
634
635@table @code
636@item armColor
637The color to show in an armed button.
638@item fontList
639The font to use.
640@item marginBottom
641@itemx marginHeight
642@itemx marginLeft
643@itemx marginRight
644@itemx marginTop
645@itemx marginWidth
646Amount of space to leave around the item, within the border.
647@item borderWidth
648The width of the border around the menu item, on all sides.
649@item shadowThickness
650The width of the border shadow.
651@item bottomShadowColor
652The color for the border shadow, on the bottom and the right.
653@item topShadowColor
654The color for the border shadow, on the top and the left.
655@end table
e8fd09cc 656@end ifnottex
488dd4c4
JD
657
658
659@node GTK resources
660@appendixsec GTK resources
e8fd09cc
JD
661@iftex
662 The most common way to customize the GTK widgets Emacs uses (menus, dialogs
663tool bars and scroll bars) is by choosing an appropriate theme, for example
664with the GNOME theme selector. You can also do Emacs specific customization
665by inserting GTK style directives in the file @file{~/.emacs.d/gtkrc}. Some GTK
666themes ignore customizations in @file{~/.emacs.d/gtkrc} so not everything
667works with all themes. To customize Emacs font, background, faces, etc., use
668the normal X resources (@pxref{Resources}). We will present some examples of
669customizations here, but for a more detailed description, see the online manual
670
671 The first example is just one line. It changes the font on all GTK widgets
672to courier with size 12:
673
674@smallexample
675gtk-font-name = "courier 12"
676@end smallexample
677
678 The thing to note is that the font name is not an X font name, like
679-*-helvetica-medium-r-*--*-120-*-*-*-*-*-*, but a Pango font name. A Pango
680font name is basically of the format "family style size", where the style
681is optional as in the case above. A name with a style could be for example:
682
683@smallexample
684gtk-font-name = "helvetica bold 10"
685@end smallexample
686
687 To customize widgets you first define a style and then apply the style to
688the widgets. Here is an example that sets the font for menus, but not
689for other widgets:
690
691@smallexample
692# @r{Define the style @samp{menufont}.}
693style "menufont"
694@{
695 font_name = "helvetica bold 14" # This is a Pango font name
696@}
697
698# @r{Specify that widget type @samp{*emacs-menuitem*} uses @samp{menufont}.}
699widget "*emacs-menuitem*" style "menufont"
700@end smallexample
701
702The widget name in this example contains wildcards, so the style will be
703applied to all widgets that match "*emacs-menuitem*". The widgets are
704named by the way they are contained, from the outer widget to the inner widget.
705So to apply the style "my_style" (not shown) with the full, absolute name, for
706the menubar and the scroll bar in Emacs we use:
707
708@smallexample
709widget "Emacs.pane.menubar" style "my_style"
710widget "Emacs.pane.emacs.verticalScrollBar" style "my_style"
711@end smallexample
c6aea8f8 712
e8fd09cc
JD
713But to avoid having to type it all, wildcards are often used. @samp{*}
714matches zero or more characters and @samp{?} matches one character. So "*"
715matches all widgets.
716
717 Each widget has a class (for example GtkMenuItem) and a name (emacs-menuitem).
718You can assign styles by name or by class. In this example we have used the
719class:
720
721@smallexample
722style "menufont"
723@{
724 font_name = "helvetica bold 14"
725@}
726
727widget_class "*GtkMenuBar" style "menufont"
728@end smallexample
729
730@noindent
731The names and classes for the GTK widgets Emacs uses are:
732
733@multitable {@code{verticalScrollbar plus}} {@code{GtkFileSelection} and some}
734@item @code{emacs-filedialog}
735@tab @code{GtkFileSelection}
736@item @code{emacs-dialog}
737@tab @code{GtkDialog}
738@item @code{Emacs}
739@tab @code{GtkWindow}
740@item @code{pane}
741@tab @code{GtkVHbox}
742@item @code{emacs}
743@tab @code{GtkFixed}
744@item @code{verticalScrollBar}
745@tab @code{GtkVScrollbar}
746@item @code{emacs-toolbar}
747@tab @code{GtkToolbar}
748@item @code{menubar}
749@tab @code{GtkMenuBar}
750@item @code{emacs-menuitem}
751@tab anything in menus
752@end multitable
753
754 GTK absolute names are quite strange when it comes to menus
755and dialogs. The names do not start with @samp{Emacs}, as they are
756free-standing windows and not contained (in the GTK sense) by the
757Emacs GtkWindow. To customize the dialogs and menus, use wildcards like this:
758
759@smallexample
760widget "*emacs-dialog*" style "my_dialog_style"
761widget "*emacs-filedialog* style "my_file_style"
762widget "*emacs-menuitem* style "my_menu_style"
763@end smallexample
764
765 If you specify a customization in @file{~/.emacs.d/gtkrc}, then it
766automatically applies only to Emacs, since other programs don't read
767that file. For example, the drop down menu in the file dialog can not
768be customized by any absolute widget name, only by an absolute class
769name. This is because the widgets in the drop down menu do not
770have names and the menu is not contained in the Emacs GtkWindow. To
771have all menus in Emacs look the same, use this in
772@file{~/.emacs.d/gtkrc}:
773
774@smallexample
775widget_class "*Menu*" style "my_menu_style"
776@end smallexample
777
778 Here is a more elaborate example, showing how to change the parts of
779the scroll bar:
780
781@smallexample
782style "scroll"
783@{
784 fg[NORMAL] = "red"@ @ @ @ @ # @r{The arrow color.}
785 bg[NORMAL] = "yellow"@ @ # @r{The thumb and background around the arrow.}
786 bg[ACTIVE] = "blue"@ @ @ @ # @r{The trough color.}
787 bg[PRELIGHT] = "white"@ # @r{The thumb color when the mouse is over it.}
788@}
789
790widget "*verticalScrollBar*" style "scroll"
791@end smallexample
792@end iftex
793
794@ifnottex
488dd4c4
JD
795@cindex GTK resources and customization
796@cindex resource files for GTK
797@cindex @file{~/.gtkrc-2.0} file
798@cindex @file{~/.emacs.d/gtkrc} file
799
35d3955b 800 If Emacs was built to use the GTK widget set, then the menu bar, tool bar,
10214524
RS
801scroll bar and the dialogs are customized with the standard GTK
802customization file, @file{~/.gtkrc-2.0}, or with the Emacs specific
803file @file{~/.emacs.d/gtkrc}. We recommend that you use
804@file{~/.emacs.d/gtkrc} for customizations, since @file{~/.gtkrc-2.0}
805seems to be ignored when running GConf with GNOME. These files apply
806only to GTK widget features. To customize Emacs font, background,
807faces, etc., use the normal X resources (@pxref{Resources}).
488dd4c4 808
9543c58c 809 Some GTK themes override these mechanisms, which means that using
10214524 810these mechanisms will not work to customize them.
583a618e 811
10214524
RS
812 In these files you first define a style and say what it means; then
813you specify to apply the style to various widget types (@pxref{GTK
814widget names}). Here is an example of how to change the font for
815Emacs menus:
488dd4c4
JD
816
817@smallexample
35d3955b 818# @r{Define the style @samp{menufont}.}
488dd4c4
JD
819style "menufont"
820@{
821 font_name = "helvetica bold 14" # This is a Pango font name
822@}
823
35d3955b 824# @r{Specify that widget type @samp{*emacs-menuitem*} uses @samp{menufont}.}
488dd4c4 825widget "*emacs-menuitem*" style "menufont"
583a618e
JD
826@end smallexample
827
828 Here is a more elaborate example, showing how to change the parts of
829the scroll bar:
9543c58c 830
583a618e
JD
831@smallexample
832style "scroll"
833@{
10214524
RS
834 fg[NORMAL] = "red"@ @ @ @ @ # @r{The arrow color.}
835 bg[NORMAL] = "yellow"@ @ # @r{The thumb and background around the arrow.}
836 bg[ACTIVE] = "blue"@ @ @ @ # @r{The trough color.}
837 bg[PRELIGHT] = "white"@ # @r{The thumb color when the mouse is over it.}
583a618e
JD
838@}
839
840widget "*verticalScrollBar*" style "scroll"
488dd4c4
JD
841@end smallexample
842
2d21bf9e
EZ
843 There are also parameters that affect GTK as a whole. For example,
844the property @code{gtk-font-name} sets the default font for GTK. You
845must use Pango font names (@pxref{GTK styles}). A GTK resources file
846that just sets a default font looks like this:
488dd4c4
JD
847
848@smallexample
849gtk-font-name = "courier 12"
850@end smallexample
851
10214524
RS
852 The GTK resources file is fully described in the GTK API document.
853This can be found in
854@file{@var{prefix}/share/gtk-doc/html/gtk/gtk-resource-files.html},
855where @file{prefix} is the directory in which the GTK libraries were
856installed (usually @file{/usr} or @file{/usr/local}). You can also
857find the document online, at
488dd4c4
JD
858@uref{http://developer.gnome.org/doc/API/2.0/gtk/gtk-Resource-Files.html}.
859
488dd4c4
JD
860@menu
861* GTK widget names:: How widgets in GTK are named in general.
0e76e1ea 862* GTK Names in Emacs:: GTK widget names in Emacs.
488dd4c4
JD
863* GTK styles:: What can be customized in a GTK widget.
864@end menu
865
488dd4c4
JD
866@node GTK widget names
867@appendixsubsec GTK widget names
868@cindex GTK widget names
869
10214524
RS
870 A GTK widget is specified by its @dfn{widget class} and
871@dfn{widget name}. The widget class is the type of the widget: for
872example, @code{GtkMenuBar}. The widget name is the name given to a
873specific widget. A widget always has a class, but need not have a
874name.
488dd4c4 875
10214524
RS
876 @dfn{Absolute names} are sequences of widget names or widget
877classes, corresponding to hierarchies of widgets embedded within
878other widgets. For example, if a @code{GtkWindow} named @code{top}
879contains a @code{GtkVBox} named @code{box}, which in turn contains
880a @code{GtkMenuBar} called @code{menubar}, the absolute class name
881of the menu-bar widget is @code{GtkWindow.GtkVBox.GtkMenuBar}, and
882its absolute widget name is @code{top.box.menubar}.
488dd4c4
JD
883
884 When assigning a style to a widget, you can use the absolute class
885name or the absolute widget name.
10214524
RS
886
887 There are two commands to specify changes for widgets:
888
889@table @asis
890@item @code{widget_class}
891specifies a style for widgets based on the absolute class name.
892
893@item @code{widget}
894specifies a style for widgets based on the absolute class name,
895or just the class.
896@end table
897
898@noindent
3eff9df2
RS
899You must specify the class and the style in double-quotes, and put
900these commands at the top level in the GTK customization file, like
10214524 901this:
488dd4c4
JD
902
903@smallexample
904style "menufont"
905@{
906 font_name = "helvetica bold 14"
907@}
908
909widget "top.box.menubar" style "menufont"
910widget_class "GtkWindow.GtkVBox.GtkMenuBar" style "menufont"
911@end smallexample
912
10214524
RS
913 Matching of absolute names uses shell wildcard syntax: @samp{*}
914matches zero or more characters and @samp{?} matches one character.
915This example assigns @code{base_style} to all widgets:
488dd4c4
JD
916
917@smallexample
918widget "*" style "base_style"
919@end smallexample
920
921 Given the absolute class name @code{GtkWindow.GtkVBox.GtkMenuBar}
10214524
RS
922and the corresponding absolute widget name @code{top.box.menubar}, all
923these examples specify @code{my_style} for the menu bar:
488dd4c4
JD
924
925@smallexample
926widget_class "GtkWindow.GtkVBox.GtkMenuBar" style "my_style"
927widget_class "GtkWindow.*.GtkMenuBar" style "my_style"
928widget_class "*GtkMenuBar" style "my_style"
929widget "top.box.menubar" style "my_style"
930widget "*box*menubar" style "my_style"
931widget "*menubar" style "my_style"
932widget "*menu*" style "my_style"
933@end smallexample
934
10214524
RS
935@node GTK Names in Emacs
936@appendixsubsec GTK Widget Names in Emacs
488dd4c4
JD
937@cindex GTK widget names
938@cindex GTK widget classes
939
10214524
RS
940 In Emacs, the top level widget for a frame is a @code{GtkWindow}
941that contains a @code{GtkVBox}. The @code{GtkVBox} contains the
942@code{GtkMenuBar} and a @code{GtkFixed} widget. The vertical scroll
943bars, @code{GtkVScrollbar}, are contained in the @code{GtkFixed}
944widget. The text you write in Emacs is drawn in the @code{GtkFixed}
945widget.
488dd4c4
JD
946
947 Dialogs in Emacs are @code{GtkDialog} widgets. The file dialog is a
948@code{GtkFileSelection} widget.
949
950@noindent
951To set a style for the menu bar using the absolute class name, use:
952
953@smallexample
954widget_class "GtkWindow.GtkVBox.GtkMenuBar" style "my_style"
955@end smallexample
956
957@noindent
958For the scroll bar, the absolute class name is:
959
960@smallexample
177c0ea7 961widget_class
488dd4c4
JD
962 "GtkWindow.GtkVBox.GtkFixed.GtkVScrollbar"
963 style "my_style"
964@end smallexample
965
966@noindent
967The names for the emacs widgets, and their classes, are:
968
969@multitable {@code{verticalScrollbar plus}} {@code{GtkFileSelection} and some}
970@item @code{emacs-filedialog}
971@tab @code{GtkFileSelection}
972@item @code{emacs-dialog}
973@tab @code{GtkDialog}
974@item @code{Emacs}
975@tab @code{GtkWindow}
976@item @code{pane}
977@tab @code{GtkVHbox}
978@item @code{emacs}
979@tab @code{GtkFixed}
a1f3b57e 980@item @code{verticalScrollBar}
488dd4c4 981@tab @code{GtkVScrollbar}
1094ef26
JD
982@item @code{emacs-toolbar}
983@tab @code{GtkToolbar}
984@item @code{menubar}
985@tab @code{GtkMenuBar}
488dd4c4
JD
986@item @code{emacs-menuitem}
987@tab anything in menus
988@end multitable
989
990@noindent
991Thus, for Emacs you can write the two examples above as:
992
993@smallexample
994widget "Emacs.pane.menubar" style "my_style"
a1f3b57e 995widget "Emacs.pane.emacs.verticalScrollBar" style "my_style"
488dd4c4
JD
996@end smallexample
997
998 GTK absolute names are quite strange when it comes to menus
177c0ea7 999and dialogs. The names do not start with @samp{Emacs}, as they are
488dd4c4
JD
1000free-standing windows and not contained (in the GTK sense) by the
1001Emacs GtkWindow. To customize the dialogs and menus, use wildcards like this:
1002
1003@smallexample
1004widget "*emacs-dialog*" style "my_dialog_style"
1005widget "*emacs-filedialog* style "my_file_style"
1006widget "*emacs-menuitem* style "my_menu_style"
1007@end smallexample
1008
10214524
RS
1009 If you specify a customization in @file{~/.emacs.d/gtkrc}, then it
1010automatically applies only to Emacs, since other programs don't read
1011that file. For example, the drop down menu in the file dialog can not
1012be customized by any absolute widget name, only by an absolute class
3eff9df2 1013name. This is because the widgets in the drop down menu do not
10214524
RS
1014have names and the menu is not contained in the Emacs GtkWindow. To
1015have all menus in Emacs look the same, use this in
1016@file{~/.emacs.d/gtkrc}:
488dd4c4
JD
1017
1018@smallexample
1019widget_class "*Menu*" style "my_menu_style"
1020@end smallexample
1021
1022@node GTK styles
1023@appendixsubsec GTK styles
1024@cindex GTK styles
1025
1026 In a GTK style you specify the appearance widgets shall have. You
10214524
RS
1027can specify foreground and background color, background pixmap and
1028font. The edit widget (where you edit the text) in Emacs is a GTK
1029widget, but trying to specify a style for the edit widget will have no
1030effect. This is so that Emacs compiled for GTK is compatible with
1031Emacs compiled for other X toolkits. The settings for foreground,
1032background and font for the edit widget is taken from the X resources;
1033@pxref{Resources}. Here is an example of two style declarations,
1034@samp{default} and @samp{ruler}:
488dd4c4
JD
1035
1036@smallexample
488dd4c4
JD
1037pixmap_path "/usr/share/pixmaps:/usr/include/X11/pixmaps"
1038
1039style "default"
1040@{
1041 font_name = "helvetica 12"
1042
1043 bg[NORMAL] = @{ 0.83, 0.80, 0.73 @}
1044 bg[SELECTED] = @{ 0.0, 0.55, 0.55 @}
1045 bg[INSENSITIVE] = @{ 0.77, 0.77, 0.66 @}
1046 bg[ACTIVE] = @{ 0.0, 0.55, 0.55 @}
1047 bg[PRELIGHT] = @{ 0.0, 0.55, 0.55 @}
1048
1049 fg[NORMAL] = "black"
1050 fg[SELECTED] = @{ 0.9, 0.9, 0.9 @}
1051 fg[ACTIVE] = "black"
1052 fg[PRELIGHT] = @{ 0.9, 0.9, 0.9 @}
1053
1054 base[INSENSITIVE] = "#777766"
1055 text[INSENSITIVE] = @{ 0.60, 0.65, 0.57 @}
1056
1057 bg_pixmap[NORMAL] = "background.xpm"
1058 bg_pixmap[INSENSITIVE] = "background.xpm"
1059 bg_pixmap[ACTIVE] = "background.xpm"
177c0ea7 1060 bg_pixmap[PRELIGHT] = "<none>"
488dd4c4
JD
1061
1062@}
1063
1064style "ruler" = "default"
1065@{
1066 font_name = "helvetica 8"
1067@}
1068
1069@end smallexample
1070
10214524 1071 The style @samp{ruler} inherits from @samp{default}. This way you can build
488dd4c4
JD
1072on existing styles. The syntax for fonts and colors is described below.
1073
10214524
RS
1074 As this example shows, it is possible to specify several values for
1075foreground and background depending on the widget's @dfn{state}. The
1076possible states are:
1077
488dd4c4
JD
1078@table @code
1079@item NORMAL
1080This is the default state for widgets.
1081@item ACTIVE
1082This is the state for a widget that is ready to do something. It is
177c0ea7 1083also for the trough of a scroll bar, i.e. @code{bg[ACTIVE] = "red"}
488dd4c4
JD
1084sets the scroll bar trough to red. Buttons that have been pressed but
1085not released yet (``armed'') are in this state.
1086@item PRELIGHT
4a446de9
RS
1087This is the state for a widget that can be manipulated, when the mouse
1088pointer is over it---for example when the mouse is over the thumb in
1089the scroll bar or over a menu item. When the mouse is over a button
1090that is not pressed, the button is in this state.
488dd4c4 1091@item SELECTED
4a446de9
RS
1092This is the state for data that has been selected by the user. It can
1093be selected text or items selected in a list. This state is not used
1094in Emacs.
488dd4c4
JD
1095@item INSENSITIVE
1096This is the state for widgets that are visible, but they can not be
10214524
RS
1097manipulated in the usual way---for example, buttons that can't be
1098pressed, and disabled menu items. To display disabled menu items in
1099yellow, use @code{fg[INSENSITIVE] = "yellow"}.
488dd4c4
JD
1100@end table
1101
10214524 1102 Here are the things that can go in a style declaration:
488dd4c4
JD
1103
1104@table @code
1105@item bg[@var{state}] = @var{color}
10214524
RS
1106This specifies the background color for the widget. Note that
1107editable text doesn't use @code{bg}; it uses @code{base} instead.
488dd4c4
JD
1108
1109@item base[@var{state}] = @var{color}
10214524
RS
1110This specifies the background color for editable text. In Emacs, this
1111color is used for the background of the text fields in the file
1112dialog.
488dd4c4
JD
1113
1114@item bg_pixmap[@var{state}] = "@var{pixmap}"
10214524
RS
1115This specifies an image background (instead of a background color).
1116@var{pixmap} should be the image file name. GTK can use a number of
1117image file formats, including XPM, XBM, GIF, JPEG and PNG. If you
1118want a widget to use the same image as its parent, use
1119@samp{<parent>}. If you don't want any image, use @samp{<none>}.
1120@samp{<none>} is the way to cancel a background image inherited from a
1121parent style.
1122
1123You can't specify the file by its absolute file name. GTK looks for
1124the pixmap file in directories specified in @code{pixmap_path}.
1125@code{pixmap_path} is a colon-separated list of directories within
1126double quotes, specified at the top level in a @file{gtkrc} file
1127(i.e. not inside a style definition; see example above):
488dd4c4
JD
1128
1129@smallexample
1130pixmap_path "/usr/share/pixmaps:/usr/include/X11/pixmaps"
1131@end smallexample
1132
1133@item fg[@var{state}] = @var{color}
10214524
RS
1134This specifies the foreground color for widgets to use. It is the
1135color of text in menus and buttons, and the color for the arrows in
1136the scroll bar. For editable text, use @code{text}.
488dd4c4
JD
1137
1138@item text[@var{state}] = @var{color}
177c0ea7 1139This is the color for editable text. In Emacs, this color is used for the
488dd4c4
JD
1140text fields in the file dialog.
1141
1142@item font_name = "@var{font}"
81c45292 1143This specifies the font for text in the widget. @var{font} is a
10214524
RS
1144Pango font name, for example @samp{Sans Italic 10}, @samp{Helvetica
1145Bold 12}, @samp{Courier 14}, @samp{Times 18}. See below for exact
1146syntax. The names are case insensitive.
488dd4c4
JD
1147@end table
1148
10214524
RS
1149 There are three ways to specify a color: by name, in hexadecimal
1150form, and with an RGB triplet.
488dd4c4
JD
1151
1152@noindent
1153A color name is written within double quotes, for example @code{"red"}.
1154
1155@noindent
10214524
RS
1156Hexadecimal form is the same as in X:
1157@code{#@var{rrrr}@var{gggg}@var{bbbb}}, where all three color specs
1158must have the same number of hex digits (1, 2, 3 or 4).
488dd4c4
JD
1159
1160@noindent
10214524
RS
1161An RGB triplet looks like @code{@{ @var{r}, @var{g}, @var{b} @}},
1162where @var{r}, @var{g} and @var{b} are either integers in the range
11630-65535 or floats in the range 0.0-1.0.
488dd4c4
JD
1164
1165 Pango font names have the form ``@var{family-list} @var{style-options}
5a7f4c1b 1166@var{size}.''
488dd4c4
JD
1167@cindex Pango font name
1168@noindent
1169@var{family-list} is a comma separated list of font families optionally
1170terminated by a comma. This way you can specify several families and the
1171first one found will be used. @var{family} corresponds to the second part in
1172an X font name, for example in
1173
1174@smallexample
1175-adobe-times-medium-r-normal--12-120-75-75-p-64-iso10646-1
1176@end smallexample
1177
1178@noindent
17f6554c 1179the family name is @samp{times}.
488dd4c4
JD
1180
1181@noindent
1182@var{style-options} is a whitespace separated list of words where each word
1183is a style, variant, weight, or stretch. The default value for all of
1184these is @code{normal}.
1185
1186@noindent
1187A `style' corresponds to the fourth part of an X font name. In X font
10214524
RS
1188names it is the character @samp{r}, @samp{i} or @samp{o}; in Pango
1189font names the corresponding values are @code{normal}, @code{italic},
1190or @code{oblique}.
488dd4c4
JD
1191
1192@noindent
1193A `variant' is either @code{normal} or @code{small-caps}.
1194Small caps is a font with the lower case characters replaced by
1195smaller variants of the capital characters.
1196
1197@noindent
1198Weight describes the ``boldness'' of a font. It corresponds to the third
1199part of an X font name. It is one of @code{ultra-light}, @code{light},
1200@code{normal}, @code{bold}, @code{ultra-bold}, or @code{heavy}.
1201
1202@noindent
1203Stretch gives the width of the font relative to other designs within a
1204family. It corresponds to the fifth part of an X font name. It is one of
1205@code{ultra-condensed}, @code{extra-condensed}, @code{condensed},
1206@code{semi-condensed}, @code{normal}, @code{semi-expanded},
1207@code{expanded}, @code{extra-expanded}, or @code{ultra-expanded}.
1208
1209@noindent
1210@var{size} is a decimal number that describes the font size in points.
e8fd09cc 1211@end ifnottex
ab5796a9
MB
1212
1213@ignore
1214 arch-tag: 9b6ff773-48b6-41f6-b2f9-f114b8bdd97f
1215@end ignore