comparison man/lispref/faces.texi @ 5791:9fae6227ede5

Silence texinfo 5.2 warnings, primarily by adding next, prev, and up pointers to all nodes. See xemacs-patches message with ID <5315f7bf.sHpFD7lXYR05GH6E%james@xemacs.org>.
author Jerry James <james@xemacs.org>
date Thu, 27 Mar 2014 08:59:03 -0600
parents 4f0a1f4cc111
children
comparison
equal deleted inserted replaced
5790:dcf9067f26bb 5791:9fae6227ede5
1 @c -*-texinfo-*- 1 @c -*-texinfo-*-
2 @c This is part of the XEmacs Lisp Reference Manual. 2 @c This is part of the XEmacs Lisp Reference Manual.
3 @c Copyright (C) 1995 Ben Wing. 3 @c Copyright (C) 1995 Ben Wing.
4 @c See the file lispref.texi for copying conditions. 4 @c See the file lispref.texi for copying conditions.
5 @setfilename ../../info/faces.info 5 @setfilename ../../info/faces.info
6 @node Faces and Window-System Objects, Glyphs, Specifiers, top 6 @node Faces and Window-System Objects, Glyphs, Specifiers, Top
7 @chapter Faces and Window-System Objects 7 @chapter Faces and Window-System Objects
8 @cindex faces 8 @cindex faces
9 @cindex window-system objects 9 @cindex window-system objects
10 10
11 @menu 11 @menu
12 * Faces:: Controlling the way text looks. 12 * Faces:: Controlling the way text looks.
13 * Fonts:: Controlling the typeface of text. 13 * Fonts:: Controlling the typeface of text.
14 * Colors:: Controlling the color of text and pixmaps. 14 * Colors:: Controlling the color of text and pixmaps.
15 @end menu 15 @end menu
16 16
17 @node Faces 17 @node Faces, Fonts, Faces and Window-System Objects, Faces and Window-System Objects
18 @section Faces 18 @section Faces
19 19
20 A @dfn{face} is a named collection of graphical properties: font, 20 A @dfn{face} is a named collection of graphical properties: font,
21 foreground color, background color, background pixmap, optional 21 foreground color, background color, background pixmap, optional
22 underlining, and (on TTY devices) whether the text is to be highlighted, 22 underlining, and (on TTY devices) whether the text is to be highlighted,
52 particular properties of a face. 52 particular properties of a face.
53 * Other Face Display Functions:: Other functions pertaining to how a 53 * Other Face Display Functions:: Other functions pertaining to how a
54 a face appears. 54 a face appears.
55 @end menu 55 @end menu
56 56
57 @node Merging Faces 57 @node Merging Faces, Basic Face Functions, Faces, Faces
58 @subsection Merging Faces for Display 58 @subsection Merging Faces for Display
59 59
60 Here are all the ways to specify which face to use for display of text: 60 Here are all the ways to specify which face to use for display of text:
61 61
62 @itemize @bullet 62 @itemize @bullet
98 displayed in the background of text characters. If the background 98 displayed in the background of text characters. If the background
99 pixmap is actually a pixmap, with its colors specified, those colors are 99 pixmap is actually a pixmap, with its colors specified, those colors are
100 used; if it is a bitmap, the face's foreground and background colors are 100 used; if it is a bitmap, the face's foreground and background colors are
101 used to color it. 101 used to color it.
102 102
103 @node Basic Face Functions 103 @node Basic Face Functions, Face Properties, Merging Faces, Faces
104 @subsection Basic Functions for Working with Faces 104 @subsection Basic Functions for Working with Faces
105 105
106 The properties a face can specify include the font, the foreground 106 The properties a face can specify include the font, the foreground
107 color, the background color, the background pixmap, the underlining, 107 color, the background color, the background pixmap, the underlining,
108 the display table, and (for TTY devices) whether the text is to be 108 the display table, and (for TTY devices) whether the text is to be
154 of aliases) are allowed, but the depth of indirection is limited to 32 154 of aliases) are allowed, but the depth of indirection is limited to 32
155 to prevent alias loops. 155 to prevent alias loops.
156 156
157 157
158 158
159 @node Face Properties 159 @node Face Properties, Face Convenience Functions, Basic Face Functions, Faces
160 @subsection Face Properties 160 @subsection Face Properties
161 161
162 You can examine and modify the properties of an existing face with the 162 You can examine and modify the properties of an existing face with the
163 following functions. 163 following functions.
164 164
366 366
367 Optional arguments @var{default} and @var{no-fallback} are the same as 367 Optional arguments @var{default} and @var{no-fallback} are the same as
368 in @code{specifier-instance}. @xref{Specifiers}. 368 in @code{specifier-instance}. @xref{Specifiers}.
369 @end defun 369 @end defun
370 370
371 @node Face Convenience Functions 371 @node Face Convenience Functions, Other Face Display Functions, Face Properties, Faces
372 @subsection Face Convenience Functions 372 @subsection Face Convenience Functions
373 373
374 @deffn Command set-face-foreground face color &optional locale tag-set how-to-add 374 @deffn Command set-face-foreground face color &optional locale tag-set how-to-add
375 @deffnx Command set-face-background face color &optional locale tag-set how-to-add 375 @deffnx Command set-face-background face color &optional locale tag-set how-to-add
376 These functions set the foreground (respectively, background) color of 376 These functions set the foreground (respectively, background) color of
467 @var{domain} (defaulting to the selected device) with Mule charset 467 @var{domain} (defaulting to the selected device) with Mule charset
468 @var{charset} (defaulting to ASCII). 468 @var{charset} (defaulting to ASCII).
469 @xref{Fonts}. 469 @xref{Fonts}.
470 @end defun 470 @end defun
471 471
472 @node Other Face Display Functions 472 @node Other Face Display Functions, , Face Convenience Functions, Faces
473 @subsection Other Face Display Functions 473 @subsection Other Face Display Functions
474 474
475 @deffn Command invert-face face &optional locale 475 @deffn Command invert-face face &optional locale
476 Swap the foreground and background colors of face @var{face}. If the 476 Swap the foreground and background colors of face @var{face}. If the
477 face doesn't specify both foreground and background, then its foreground 477 face doesn't specify both foreground and background, then its foreground
487 @defun face-differs-from-default-p face &optional domain 487 @defun face-differs-from-default-p face &optional domain
488 This returns @code{t} if the face @var{face} displays differently from 488 This returns @code{t} if the face @var{face} displays differently from
489 the default face. @var{domain} is as in @code{face-property-instance}. 489 the default face. @var{domain} is as in @code{face-property-instance}.
490 @end defun 490 @end defun
491 491
492 @node Fonts 492 @node Fonts, Colors, Faces, Faces and Window-System Objects
493 @section Fonts 493 @section Fonts
494 @cindex fonts 494 @cindex fonts
495 495
496 This section describes how to work with font specifier and 496 This section describes how to work with font specifier and
497 font instance objects, which encapsulate fonts in the window system. 497 font instance objects, which encapsulate fonts in the window system.
505 * Font Convenience Functions:: Convenience functions that automatically 505 * Font Convenience Functions:: Convenience functions that automatically
506 instance and retrieve the properties 506 instance and retrieve the properties
507 of a font specifier. 507 of a font specifier.
508 @end menu 508 @end menu
509 509
510 @node Font Specifiers 510 @node Font Specifiers, Font Instances, Fonts, Fonts
511 @subsection Font Specifiers 511 @subsection Font Specifiers
512 512
513 @defun font-specifier-p object 513 @defun font-specifier-p object
514 This predicate returns @code{t} if @var{object} is a font specifier, and 514 This predicate returns @code{t} if @var{object} is a font specifier, and
515 @code{nil} otherwise. 515 @code{nil} otherwise.
540 @item 540 @item
541 A vector of one element (a face to inherit from). 541 A vector of one element (a face to inherit from).
542 @end itemize 542 @end itemize
543 @end defun 543 @end defun
544 544
545 @node Font Instances 545 @node Font Instances, Font Instance Names, Font Specifiers, Fonts
546 @subsection Font Instances 546 @subsection Font Instances
547 547
548 @defun font-instance-p object 548 @defun font-instance-p object
549 This predicate returns @code{t} if @var{object} is a font instance, and 549 This predicate returns @code{t} if @var{object} is a font instance, and
550 @code{nil} otherwise. 550 @code{nil} otherwise.
561 ``deallocate'' the font is the way you deallocate any other lisp object: 561 ``deallocate'' the font is the way you deallocate any other lisp object:
562 you drop all pointers to it and allow it to be garbage collected. When 562 you drop all pointers to it and allow it to be garbage collected. When
563 these objects are GCed, the underlying X data is deallocated as well. 563 these objects are GCed, the underlying X data is deallocated as well.
564 @end defun 564 @end defun
565 565
566 @node Font Instance Names 566 @node Font Instance Names, Font Instance Size, Font Instances, Fonts
567 @subsection Font Instance Names 567 @subsection Font Instance Names
568 @cindex font instance name 568 @cindex font instance name
569 @cindex available fonts 569 @cindex available fonts
570 @cindex fonts available 570 @cindex fonts available
571 571
584 Font names are patterns which may match any number of fonts, of which 584 Font names are patterns which may match any number of fonts, of which
585 the first found is used. This returns an unambiguous name for that font 585 the first found is used. This returns an unambiguous name for that font
586 (but not necessarily its only unambiguous name). 586 (but not necessarily its only unambiguous name).
587 @end defun 587 @end defun
588 588
589 @node Font Instance Size 589 @node Font Instance Size, Font Instance Characteristics, Font Instance Names, Fonts
590 @subsection Font Instance Size 590 @subsection Font Instance Size
591 @cindex font instance size 591 @cindex font instance size
592 592
593 @defun x-font-size font 593 @defun x-font-size font
594 This function returns the nominal size of the given font. This is done 594 This function returns the nominal size of the given font. This is done
612 If scalable fonts are available, this returns a font which is 1 point 612 If scalable fonts are available, this returns a font which is 1 point
613 smaller. Otherwise, it returns the next smaller version of this font 613 smaller. Otherwise, it returns the next smaller version of this font
614 that is defined. 614 that is defined.
615 @end defun 615 @end defun
616 616
617 @node Font Instance Characteristics 617 @node Font Instance Characteristics, Font Convenience Functions, Font Instance Size, Fonts
618 @subsection Font Instance Characteristics 618 @subsection Font Instance Characteristics
619 @cindex font instance characteristics 619 @cindex font instance characteristics
620 @cindex characteristics of font instances 620 @cindex characteristics of font instances
621 @cindex bold 621 @cindex bold
622 @cindex demibold 622 @cindex demibold
651 @defun x-make-font-bold-italic font &optional device 651 @defun x-make-font-bold-italic font &optional device
652 Given an X font specification, this attempts to make a ``bold-italic'' 652 Given an X font specification, this attempts to make a ``bold-italic''
653 font. If it fails, it returns @code{nil}. 653 font. If it fails, it returns @code{nil}.
654 @end defun 654 @end defun
655 655
656 @node Font Convenience Functions 656 @node Font Convenience Functions, , Font Instance Characteristics, Fonts
657 @subsection Font Convenience Functions 657 @subsection Font Convenience Functions
658 658
659 @defun font-name font &optional domain 659 @defun font-name font &optional domain
660 This function returns the name of the @var{font} in the specified 660 This function returns the name of the @var{font} in the specified
661 @var{domain}, if any. @var{font} should be a font specifier object and 661 @var{domain}, if any. @var{font} should be a font specifier object and
678 @var{domain} is normally a window and defaults to the selected window if 678 @var{domain} is normally a window and defaults to the selected window if
679 omitted. This is equivalent to using @code{specifier-instance} and 679 omitted. This is equivalent to using @code{specifier-instance} and
680 applying @code{font-instance-properties} to the result. 680 applying @code{font-instance-properties} to the result.
681 @end defun 681 @end defun
682 682
683 @node Colors 683 @node Colors, , Fonts, Faces and Window-System Objects
684 @section Colors 684 @section Colors
685 @cindex colors 685 @cindex colors
686 686
687 @menu 687 @menu
688 * Color Specifiers:: Specifying how a color will appear. 688 * Color Specifiers:: Specifying how a color will appear.
691 * Color Convenience Functions:: Convenience functions that automatically 691 * Color Convenience Functions:: Convenience functions that automatically
692 instance and retrieve the properties 692 instance and retrieve the properties
693 of a color specifier. 693 of a color specifier.
694 @end menu 694 @end menu
695 695
696 @node Color Specifiers 696 @node Color Specifiers, Color Instances, Colors, Colors
697 @subsection Color Specifiers 697 @subsection Color Specifiers
698 698
699 @defun color-specifier-p object 699 @defun color-specifier-p object
700 This function returns non-@code{nil} if @var{object} is a color specifier. 700 This function returns non-@code{nil} if @var{object} is a color specifier.
701 @end defun 701 @end defun
755 @end itemize 755 @end itemize
756 756
757 @end defun 757 @end defun
758 758
759 759
760 @node Color Instances 760 @node Color Instances, Color Instance Properties, Color Specifiers, Colors
761 @subsection Color Instances 761 @subsection Color Instances
762 @cindex color instances 762 @cindex color instances
763 763
764 A @dfn{color-instance object} is an object describing the way a color 764 A @dfn{color-instance object} is an object describing the way a color
765 specifier is instanced in a particular domain. Functions such as 765 specifier is instanced in a particular domain. Functions such as
777 777
778 @defun color-instance-p object 778 @defun color-instance-p object
779 This function returns non-@code{nil} if @var{object} is a color-instance. 779 This function returns non-@code{nil} if @var{object} is a color-instance.
780 @end defun 780 @end defun
781 781
782 @node Color Instance Properties 782 @node Color Instance Properties, Color Convenience Functions, Color Instances, Colors
783 @subsection Color Instance Properties 783 @subsection Color Instance Properties
784 784
785 @defun color-instance-name color-instance 785 @defun color-instance-name color-instance
786 This function returns the name used to allocate @var{color-instance}. 786 This function returns the name used to allocate @var{color-instance}.
787 @end defun 787 @end defun
795 (face-background-instance 'default (next-window))) 795 (face-background-instance 'default (next-window)))
796 @result{} (65535 58596 46517) 796 @result{} (65535 58596 46517)
797 @end example 797 @end example
798 @end defun 798 @end defun
799 799
800 @node Color Convenience Functions 800 @node Color Convenience Functions, , Color Instance Properties, Colors
801 @subsection Color Convenience Functions 801 @subsection Color Convenience Functions
802 802
803 @defun color-name color &optional domain 803 @defun color-name color &optional domain
804 This function returns the name of the @var{color} in the specified 804 This function returns the name of the @var{color} in the specified
805 @var{domain}, if any. @var{color} should be a color specifier object 805 @var{domain}, if any. @var{color} should be a color specifier object