diff options
| author | Chong Yidong | 2010-03-20 13:24:06 -0400 |
|---|---|---|
| committer | Chong Yidong | 2010-03-20 13:24:06 -0400 |
| commit | d68eb23c6a6b9fc7f1c0d2873f98fb0dd51dbfd9 (patch) | |
| tree | 222e3f0c08d49ce6db22e8ad8c1191a6e0c00a67 | |
| parent | ad13a3ee9b9f4ee81b19c6c02da8cc338901304e (diff) | |
| download | emacs-d68eb23c6a6b9fc7f1c0d2873f98fb0dd51dbfd9.tar.gz emacs-d68eb23c6a6b9fc7f1c0d2873f98fb0dd51dbfd9.zip | |
Document font-use-system-font.
* cmdargs.texi (Font X): Move most content to Fonts.
* frames.texi (Fonts): New node. Document font-use-system-font.
* emacs.texi (Top):
* xresources.texi (Table of Resources):
* mule.texi (Defining Fontsets, Charsets): Update xrefs.
| -rw-r--r-- | doc/emacs/ChangeLog | 10 | ||||
| -rw-r--r-- | doc/emacs/cmdargs.texi | 251 | ||||
| -rw-r--r-- | doc/emacs/emacs.texi | 1 | ||||
| -rw-r--r-- | doc/emacs/frames.texi | 289 | ||||
| -rw-r--r-- | doc/emacs/mule.texi | 4 | ||||
| -rw-r--r-- | doc/emacs/xresources.texi | 2 | ||||
| -rw-r--r-- | etc/NEWS | 4 |
7 files changed, 300 insertions, 261 deletions
diff --git a/doc/emacs/ChangeLog b/doc/emacs/ChangeLog index 55ae0882882..ebb4775e939 100644 --- a/doc/emacs/ChangeLog +++ b/doc/emacs/ChangeLog | |||
| @@ -1,3 +1,13 @@ | |||
| 1 | 2010-03-20 Chong Yidong <cyd@stupidchicken.com> | ||
| 2 | |||
| 3 | * cmdargs.texi (Font X): Move most content to Fonts. | ||
| 4 | |||
| 5 | * frames.texi (Fonts): New node. Document font-use-system-font. | ||
| 6 | |||
| 7 | * emacs.texi (Top): | ||
| 8 | * xresources.texi (Table of Resources): | ||
| 9 | * mule.texi (Defining Fontsets, Charsets): Update xrefs. | ||
| 10 | |||
| 1 | 2010-03-06 Chong Yidong <cyd@stupidchicken.com> | 11 | 2010-03-06 Chong Yidong <cyd@stupidchicken.com> |
| 2 | 12 | ||
| 3 | * custom.texi (Init Examples): Add xref to Locals. | 13 | * custom.texi (Init Examples): Add xref to Locals. |
diff --git a/doc/emacs/cmdargs.texi b/doc/emacs/cmdargs.texi index aefe7b3bfc0..a139e0eb0f4 100644 --- a/doc/emacs/cmdargs.texi +++ b/doc/emacs/cmdargs.texi | |||
| @@ -755,10 +755,9 @@ remote machine. | |||
| 755 | @appendixsec Font Specification Options | 755 | @appendixsec Font Specification Options |
| 756 | @cindex font name (X Window System) | 756 | @cindex font name (X Window System) |
| 757 | 757 | ||
| 758 | By default, Emacs displays text in X using a twelve point monospace | 758 | You can use the command line option @samp{-fn @var{font}} (or |
| 759 | font. You can specify a different font using the command line option | 759 | @samp{--font}, which is an alias for @samp{-fn}) to specify a default |
| 760 | @samp{-fn @var{font}} (or @samp{--font}, which is an alias for | 760 | font: |
| 761 | @samp{-fn}). | ||
| 762 | 761 | ||
| 763 | @table @samp | 762 | @table @samp |
| 764 | @item -fn @var{font} | 763 | @item -fn @var{font} |
| @@ -772,252 +771,14 @@ Use @var{font} as the default font. | |||
| 772 | When passing a font specification to Emacs on the command line, you | 771 | When passing a font specification to Emacs on the command line, you |
| 773 | may need to ``quote'' it, by enclosing it in quotation marks, if it | 772 | may need to ``quote'' it, by enclosing it in quotation marks, if it |
| 774 | contains characters that the shell treats specially (e.g. spaces). | 773 | contains characters that the shell treats specially (e.g. spaces). |
| 775 | Here is an example: | 774 | For example: |
| 776 | 775 | ||
| 777 | @smallexample | 776 | @smallexample |
| 778 | emacs -fn "DejaVu Sans Mono-12" | 777 | emacs -fn "DejaVu Sans Mono-12" |
| 779 | @end smallexample | 778 | @end smallexample |
| 780 | 779 | ||
| 781 | @cindex X defaults file | 780 | @xref{Fonts}, for other ways to specify the default font and font name |
| 782 | @cindex X resources file | 781 | formats. |
| 783 | You can also specify the font using your X resources file (usually a | ||
| 784 | file named @file{.Xdefaults} or @file{.Xresources} in your home | ||
| 785 | directory), by adding a line like this: | ||
| 786 | |||
| 787 | @smallexample | ||
| 788 | emacs.font: @var{font} | ||
| 789 | @end smallexample | ||
| 790 | |||
| 791 | @noindent | ||
| 792 | You must restart X, or use the @command{xrdb} command, for the X | ||
| 793 | resources file to take effect. @xref{Resources}. When specifying a | ||
| 794 | font in your X resources file, you should not quote it. | ||
| 795 | |||
| 796 | @cindex fontconfig | ||
| 797 | Emacs recognizes two types of fonts: @dfn{client-side} fonts, which | ||
| 798 | are provided by the Xft and Fontconfig libraries, and | ||
| 799 | @dfn{server-side} fonts, which are provided by the X server itself. | ||
| 800 | Most client-side fonts support advanced font features such as | ||
| 801 | antialiasing and subpixel hinting, while server-side fonts do not. | ||
| 802 | |||
| 803 | There are four different ways to express a ``font name''. The first | ||
| 804 | format consists of @dfn{Fontconfig patterns}. Fontconfig patterns | ||
| 805 | match only client-side fonts provided by Xft and Fontconfig, and have | ||
| 806 | the following form: | ||
| 807 | |||
| 808 | @smallexample | ||
| 809 | @var{fontname}[-@var{fontsize}][:@var{name1}=@var{values1}][:@var{name2}=@var{values2}]... | ||
| 810 | @end smallexample | ||
| 811 | |||
| 812 | @noindent | ||
| 813 | Within this format, any of the elements in braces may be omitted. | ||
| 814 | Here, @var{fontname} is the ``family name'' of the font, such as | ||
| 815 | @samp{Monospace} or @samp{DejaVu Serif}; @var{fontsize} is the ``point | ||
| 816 | size'' of the font (one ``printer's point'' is about 1/72 of an inch); | ||
| 817 | and the @samp{@var{name}=@var{values}} entries specify settings such | ||
| 818 | as the slant and weight of the font. Each @var{values} may be a | ||
| 819 | single value, or a list of values separated by commas. In addition, | ||
| 820 | some property values are valid with only one kind of property name, in | ||
| 821 | which case the @samp{@var{name}=} part may be omitted. | ||
| 822 | |||
| 823 | Here is a list of common font properties: | ||
| 824 | |||
| 825 | @table @samp | ||
| 826 | @item slant | ||
| 827 | One of @samp{italic}, @samp{oblique} or @samp{roman}. | ||
| 828 | |||
| 829 | @item weight | ||
| 830 | One of @samp{light}, @samp{medium}, @samp{demibold}, @samp{bold} or | ||
| 831 | @samp{black}. | ||
| 832 | |||
| 833 | @item style | ||
| 834 | Some fonts define special styles which are a combination of slant and | ||
| 835 | weight. For instance, the font @samp{Dejavu Sans} defines the style | ||
| 836 | @samp{book}. This property, if specified, overrides the slant and | ||
| 837 | weight properties. | ||
| 838 | |||
| 839 | @item width | ||
| 840 | One of @samp{condensed}, @samp{normal}, or @samp{expanded}. | ||
| 841 | |||
| 842 | @item spacing | ||
| 843 | One of @samp{monospace}, @samp{proportional}, @samp{dual-width}, or | ||
| 844 | @samp{charcell}. | ||
| 845 | @end table | ||
| 846 | |||
| 847 | @noindent | ||
| 848 | Here are some examples of Fontconfig patterns: | ||
| 849 | |||
| 850 | @smallexample | ||
| 851 | Monospace | ||
| 852 | Monospace-12 | ||
| 853 | Monospace-12:bold | ||
| 854 | DejaVu Sans Mono:bold:italic | ||
| 855 | Monospace-12:weight=bold:slant=italic | ||
| 856 | @end smallexample | ||
| 857 | |||
| 858 | See the Fontconfig manual for a more detailed description of | ||
| 859 | Fontconfig patterns. This manual is located in the file | ||
| 860 | @file{fontconfig-user.html}, which is distributed with Fontconfig. It | ||
| 861 | is also available online at | ||
| 862 | @url{http://fontconfig.org/fontconfig-user.html}. In particular, the | ||
| 863 | manual describes additional font properties that influence how the | ||
| 864 | font is hinted, antialiased, or scaled. | ||
| 865 | |||
| 866 | The second way to specify a font is to use a @dfn{GTK font | ||
| 867 | description}. Like Fontconfig patterns, GTK font descriptions match | ||
| 868 | only client-side fonts provided by Xft and Fontconfig. They have the | ||
| 869 | syntax | ||
| 870 | |||
| 871 | @smallexample | ||
| 872 | @var{fontname} [@var{properties}] [@var{fontsize}] | ||
| 873 | @end smallexample | ||
| 874 | |||
| 875 | @noindent | ||
| 876 | where @var{fontname} is the family name, @var{properties} is a list of | ||
| 877 | property values separated by spaces, and @var{fontsize} is the point | ||
| 878 | size. The properties that you may specify are as follows: | ||
| 879 | |||
| 880 | @table @samp | ||
| 881 | @item style | ||
| 882 | One of @samp{roman}, @samp{italic} or @samp{oblique}. If omitted, the | ||
| 883 | @samp{roman} style is used. | ||
| 884 | @item weight | ||
| 885 | One of @samp{medium}, @samp{ultra-light}, @samp{light}, | ||
| 886 | @samp{semi-bold}, or @samp{bold}. If omitted, @samp{medium} weight is | ||
| 887 | used. | ||
| 888 | @end table | ||
| 889 | |||
| 890 | @noindent | ||
| 891 | Here are some examples of GTK font descriptions: | ||
| 892 | |||
| 893 | @smallexample | ||
| 894 | Monospace 12 | ||
| 895 | Monospace Bold Italic 12 | ||
| 896 | @end smallexample | ||
| 897 | |||
| 898 | @cindex XLFD | ||
| 899 | @cindex X Logical Font Description | ||
| 900 | The third way to specify a font is to use an @dfn{XLFD} (@dfn{X | ||
| 901 | Logical Font Description}), which is the traditional method for | ||
| 902 | specifying fonts under X. Each XLFD consists of fourteen words or | ||
| 903 | numbers, separated by dashes, like this: | ||
| 904 | |||
| 905 | @smallexample | ||
| 906 | -misc-fixed-medium-r-semicondensed--13-*-*-*-c-60-iso8859-1 | ||
| 907 | @end smallexample | ||
| 908 | |||
| 909 | @noindent | ||
| 910 | A wildcard character (@samp{*}) in an XLFD matches any sequence of | ||
| 911 | characters (including none), and @samp{?} matches any single | ||
| 912 | character. However, matching is implementation-dependent, and can be | ||
| 913 | inaccurate when wildcards match dashes in a long name. For reliable | ||
| 914 | results, supply all 14 dashes and use wildcards only within a field. | ||
| 915 | Case is insignificant in an XLFD. The syntax for an XLFD is as | ||
| 916 | follows: | ||
| 917 | |||
| 918 | @smallexample | ||
| 919 | -@var{maker}-@var{family}-@var{weight}-@var{slant}-@var{widthtype}-@var{style}@dots{} | ||
| 920 | @dots{}-@var{pixels}-@var{height}-@var{horiz}-@var{vert}-@var{spacing}-@var{width}-@var{registry}-@var{encoding} | ||
| 921 | @end smallexample | ||
| 922 | |||
| 923 | @noindent | ||
| 924 | The entries have the following meanings: | ||
| 925 | |||
| 926 | @table @var | ||
| 927 | @item maker | ||
| 928 | The name of the font manufacturer. | ||
| 929 | @item family | ||
| 930 | The name of the font family (e.g. @samp{courier}). | ||
| 931 | @item weight | ||
| 932 | The font weight---normally either @samp{bold}, @samp{medium} or | ||
| 933 | @samp{light}. Some font names support other values. | ||
| 934 | @item slant | ||
| 935 | The font slant---normally @samp{r} (roman), @samp{i} (italic), | ||
| 936 | @samp{o} (oblique), @samp{ri} (reverse italic), or @samp{ot} (other). | ||
| 937 | Some font names support other values. | ||
| 938 | @item widthtype | ||
| 939 | The font width---normally @samp{condensed}, @samp{extended}, | ||
| 940 | @samp{semicondensed} or @samp{normal} (some font names support other | ||
| 941 | values). | ||
| 942 | @item style | ||
| 943 | An optional additional style name. Usually it is empty---most long | ||
| 944 | font names have two hyphens in a row at this point. | ||
| 945 | @item pixels | ||
| 946 | The font height, in pixels. | ||
| 947 | @item height | ||
| 948 | The font height on the screen, measured in tenths of a printer's | ||
| 949 | point. This is the point size of the font, times ten. For a given | ||
| 950 | vertical resolution, @var{height} and @var{pixels} are proportional; | ||
| 951 | therefore, it is common to specify just one of them and use @samp{*} | ||
| 952 | for the other. | ||
| 953 | @item horiz | ||
| 954 | The horizontal resolution, in pixels per inch, of the screen for which | ||
| 955 | the font is intended. | ||
| 956 | @item vert | ||
| 957 | The vertical resolution, in pixels per inch, of the screen for which | ||
| 958 | the font is intended. Normally the resolution of the fonts on your | ||
| 959 | system is the right value for your screen; therefore, you normally | ||
| 960 | specify @samp{*} for this and @var{horiz}. | ||
| 961 | @item spacing | ||
| 962 | This is @samp{m} (monospace), @samp{p} (proportional) or @samp{c} | ||
| 963 | (character cell). | ||
| 964 | @item width | ||
| 965 | The average character width, in pixels, multiplied by ten. | ||
| 966 | @item registry | ||
| 967 | @itemx encoding | ||
| 968 | The X font character set that the font depicts. (X font character | ||
| 969 | sets are not the same as Emacs character sets, but they are similar.) | ||
| 970 | You can use the @command{xfontsel} program to check which choices you | ||
| 971 | have. Normally you should use @samp{iso8859} for @var{registry} and | ||
| 972 | @samp{1} for @var{encoding}. | ||
| 973 | @end table | ||
| 974 | |||
| 975 | Some fonts have shorter nicknames, which you can use instead of a | ||
| 976 | normal font specification. For instance, | ||
| 977 | |||
| 978 | @smallexample | ||
| 979 | -misc-fixed-medium-r-semicondensed--13-*-*-*-c-60-iso8859-1 | ||
| 980 | @end smallexample | ||
| 981 | |||
| 982 | @noindent | ||
| 983 | is equivalent to @samp{6x13}. This is the fourth and final method of | ||
| 984 | specifying a font. | ||
| 985 | |||
| 986 | @cindex listing system fonts | ||
| 987 | You will probably want to use a fixed-width default font---that is, | ||
| 988 | a font in which all characters have the same width. Here's how to use | ||
| 989 | the @command{fc-list} command to list all fixed-width Xft and | ||
| 990 | Fontconfig fonts available on your system: | ||
| 991 | |||
| 992 | @example | ||
| 993 | fc-list :spacing=mono | ||
| 994 | fc-list :spacing=charcell | ||
| 995 | @end example | ||
| 996 | |||
| 997 | For server-side X fonts, any font with @samp{m} or @samp{c} in the | ||
| 998 | @var{spacing} field of the XLFD is a fixed-width font. Here's how to | ||
| 999 | use the @command{xlsfonts} program to list all the fixed-width fonts | ||
| 1000 | available on your system: | ||
| 1001 | |||
| 1002 | @example | ||
| 1003 | xlsfonts -fn '*x*' | egrep "^[0-9]+x[0-9]+" | ||
| 1004 | xlsfonts -fn '*-*-*-*-*-*-*-*-*-*-*-m*' | ||
| 1005 | xlsfonts -fn '*-*-*-*-*-*-*-*-*-*-*-c*' | ||
| 1006 | @end example | ||
| 1007 | |||
| 1008 | @noindent | ||
| 1009 | To see what a particular font looks like, use the @command{xfd} command. | ||
| 1010 | For example: | ||
| 1011 | |||
| 1012 | @example | ||
| 1013 | xfd -fn 6x13 | ||
| 1014 | @end example | ||
| 1015 | |||
| 1016 | @noindent | ||
| 1017 | displays the entire font @samp{6x13}. | ||
| 1018 | |||
| 1019 | While running Emacs, you can set the font of a specific kind of text | ||
| 1020 | (@pxref{Faces}), or of a particular frame (@pxref{Frame Parameters}). | ||
| 1021 | 782 | ||
| 1022 | @node Colors | 783 | @node Colors |
| 1023 | @appendixsec Window Color Options | 784 | @appendixsec Window Color Options |
diff --git a/doc/emacs/emacs.texi b/doc/emacs/emacs.texi index 5205f2df540..cce5976bb1f 100644 --- a/doc/emacs/emacs.texi +++ b/doc/emacs/emacs.texi | |||
| @@ -502,6 +502,7 @@ Frames and Graphical Displays | |||
| 502 | * Mode Line Mouse:: Mouse clicks on the mode line. | 502 | * Mode Line Mouse:: Mouse clicks on the mode line. |
| 503 | * Creating Frames:: Creating additional Emacs frames with various contents. | 503 | * Creating Frames:: Creating additional Emacs frames with various contents. |
| 504 | * Frame Commands:: Iconifying, deleting, and switching frames. | 504 | * Frame Commands:: Iconifying, deleting, and switching frames. |
| 505 | * Fonts:: Changing the frame font. | ||
| 505 | * Speedbar:: How to make and use a speedbar frame. | 506 | * Speedbar:: How to make and use a speedbar frame. |
| 506 | * Multiple Displays:: How one Emacs job can talk to several displays. | 507 | * Multiple Displays:: How one Emacs job can talk to several displays. |
| 507 | * Special Buffer Frames:: You can make certain buffers have their own frames. | 508 | * Special Buffer Frames:: You can make certain buffers have their own frames. |
diff --git a/doc/emacs/frames.texi b/doc/emacs/frames.texi index b890b773765..0d3229b7388 100644 --- a/doc/emacs/frames.texi +++ b/doc/emacs/frames.texi | |||
| @@ -39,6 +39,7 @@ so that you can use many of the features described in this chapter. | |||
| 39 | * Mode Line Mouse:: Mouse clicks on the mode line. | 39 | * Mode Line Mouse:: Mouse clicks on the mode line. |
| 40 | * Creating Frames:: Creating additional Emacs frames with various contents. | 40 | * Creating Frames:: Creating additional Emacs frames with various contents. |
| 41 | * Frame Commands:: Iconifying, deleting, and switching frames. | 41 | * Frame Commands:: Iconifying, deleting, and switching frames. |
| 42 | * Fonts:: Changing the frame font. | ||
| 42 | * Speedbar:: How to make and use a speedbar frame. | 43 | * Speedbar:: How to make and use a speedbar frame. |
| 43 | * Multiple Displays:: How one Emacs job can talk to several displays. | 44 | * Multiple Displays:: How one Emacs job can talk to several displays. |
| 44 | * Special Buffer Frames:: You can make certain buffers have their own frames. | 45 | * Special Buffer Frames:: You can make certain buffers have their own frames. |
| @@ -571,25 +572,19 @@ only the initial frame. @xref{Initial Parameters,,, elisp, The Emacs | |||
| 571 | Lisp Reference Manual}, for more information. | 572 | Lisp Reference Manual}, for more information. |
| 572 | 573 | ||
| 573 | @cindex font (default) | 574 | @cindex font (default) |
| 574 | For instance, one way to specify the principal font for all your | 575 | Here is an example of using @code{default-frame-alist} to specify |
| 575 | Emacs frames is to modify @code{default-frame-alist} to specify the | 576 | the default foreground color and font: |
| 576 | @code{font} parameter (@pxref{Font X}): | ||
| 577 | 577 | ||
| 578 | @example | 578 | @example |
| 579 | (add-to-list 'default-frame-alist '(font . "10x20")) | 579 | (add-to-list 'default-frame-alist '(font . "10x20")) |
| 580 | @end example | ||
| 581 | |||
| 582 | @noindent | ||
| 583 | Here's a similar example for specifying a foreground color: | ||
| 584 | |||
| 585 | @example | ||
| 586 | (add-to-list 'default-frame-alist '(foreground-color . "blue")) | 580 | (add-to-list 'default-frame-alist '(foreground-color . "blue")) |
| 587 | @end example | 581 | @end example |
| 588 | 582 | ||
| 589 | @noindent | 583 | @noindent |
| 590 | By putting such customizations in your init file, you can control the | 584 | By putting such customizations in your init file, you can control the |
| 591 | appearance of all the frames Emacs creates, including the initial one. | 585 | appearance of all the frames Emacs creates, including the initial one |
| 592 | @xref{Init File}. | 586 | (@pxref{Init File}). @xref{Fonts}, for other ways to set the default |
| 587 | font. | ||
| 593 | 588 | ||
| 594 | @node Frame Commands | 589 | @node Frame Commands |
| 595 | @section Frame Commands | 590 | @section Frame Commands |
| @@ -645,6 +640,278 @@ select it, the variable should be @code{nil}. The default is | |||
| 645 | a frame that raises, so this variable has no effect in the native | 640 | a frame that raises, so this variable has no effect in the native |
| 646 | MS-Windows build of Emacs. | 641 | MS-Windows build of Emacs. |
| 647 | 642 | ||
| 643 | @node Fonts | ||
| 644 | @section Fonts | ||
| 645 | @cindex fonts | ||
| 646 | |||
| 647 | By default, Emacs displays text in X using a 12-point monospace | ||
| 648 | font. There are several different ways to specify a different font: | ||
| 649 | |||
| 650 | @itemize | ||
| 651 | @item | ||
| 652 | Click on @samp{Set Default Font} in the @samp{Options} menu. To save | ||
| 653 | this for future sessions, click on @samp{Save Options} in the | ||
| 654 | @samp{Options} menu. | ||
| 655 | |||
| 656 | @item | ||
| 657 | Add a line to your init file (@pxref{Init File}), modifying the | ||
| 658 | variable @code{default-frame-alist} to specify the @code{font} | ||
| 659 | parameter (@pxref{Creating Frames}), like this: | ||
| 660 | |||
| 661 | @smallexample | ||
| 662 | (add-to-list 'default-frame-alist '(font . "DejaVu Sans Mono-12")) | ||
| 663 | @end smallexample | ||
| 664 | |||
| 665 | @cindex X defaults file | ||
| 666 | @cindex X resources file | ||
| 667 | @item | ||
| 668 | Add an @samp{emacs.font} X resource setting to your X resource file, | ||
| 669 | like this: | ||
| 670 | |||
| 671 | @smallexample | ||
| 672 | emacs.font: DejaVu Sans Mono-12 | ||
| 673 | @end smallexample | ||
| 674 | |||
| 675 | @noindent | ||
| 676 | You must restart X, or use the @command{xrdb} command, for the X | ||
| 677 | resources file to take effect. @xref{Resources}. When specifying a | ||
| 678 | font in your X resources file, you should not quote it. | ||
| 679 | |||
| 680 | @item | ||
| 681 | If you are running Emacs on the GNOME desktop, you can tell Emacs to | ||
| 682 | use the default system font by setting the variable | ||
| 683 | @code{font-use-system-font} to @code{t} (the default is @code{nil}). | ||
| 684 | For this to work, Emacs must be compiled with Gconf support; this is | ||
| 685 | done automatically if the libraries are present at compile time. | ||
| 686 | |||
| 687 | @item | ||
| 688 | Use the command line option @samp{-fn} (or @samp{--font}). @xref{Font | ||
| 689 | X}. | ||
| 690 | @end itemize | ||
| 691 | |||
| 692 | @cindex fontconfig | ||
| 693 | On X, there are four different ways to express a ``font name''. The | ||
| 694 | first is to use a @dfn{Fontconfig pattern}. Fontconfig patterns have | ||
| 695 | the following form: | ||
| 696 | |||
| 697 | @smallexample | ||
| 698 | @var{fontname}[-@var{fontsize}][:@var{name1}=@var{values1}][:@var{name2}=@var{values2}]... | ||
| 699 | @end smallexample | ||
| 700 | |||
| 701 | @noindent | ||
| 702 | Within this format, any of the elements in braces may be omitted. | ||
| 703 | Here, @var{fontname} is the @dfn{family name} of the font, such as | ||
| 704 | @samp{Monospace} or @samp{DejaVu Serif}; @var{fontsize} is the | ||
| 705 | @dfn{point size} of the font (one @dfn{printer's point} is about 1/72 | ||
| 706 | of an inch); and the @samp{@var{name}=@var{values}} entries specify | ||
| 707 | settings such as the slant and weight of the font. Each @var{values} | ||
| 708 | may be a single value, or a list of values separated by commas. In | ||
| 709 | addition, some property values are valid with only one kind of | ||
| 710 | property name, in which case the @samp{@var{name}=} part may be | ||
| 711 | omitted. | ||
| 712 | |||
| 713 | Here is a list of common font properties: | ||
| 714 | |||
| 715 | @table @samp | ||
| 716 | @item slant | ||
| 717 | One of @samp{italic}, @samp{oblique} or @samp{roman}. | ||
| 718 | |||
| 719 | @item weight | ||
| 720 | One of @samp{light}, @samp{medium}, @samp{demibold}, @samp{bold} or | ||
| 721 | @samp{black}. | ||
| 722 | |||
| 723 | @item style | ||
| 724 | Some fonts define special styles which are a combination of slant and | ||
| 725 | weight. For instance, @samp{Dejavu Sans} defines the @samp{book} | ||
| 726 | style, which overrides the slant and weight properties. | ||
| 727 | |||
| 728 | @item width | ||
| 729 | One of @samp{condensed}, @samp{normal}, or @samp{expanded}. | ||
| 730 | |||
| 731 | @item spacing | ||
| 732 | One of @samp{monospace}, @samp{proportional}, @samp{dual-width}, or | ||
| 733 | @samp{charcell}. | ||
| 734 | @end table | ||
| 735 | |||
| 736 | @noindent | ||
| 737 | Here are some examples of Fontconfig patterns: | ||
| 738 | |||
| 739 | @smallexample | ||
| 740 | Monospace | ||
| 741 | Monospace-12 | ||
| 742 | Monospace-12:bold | ||
| 743 | DejaVu Sans Mono:bold:italic | ||
| 744 | Monospace-12:weight=bold:slant=italic | ||
| 745 | @end smallexample | ||
| 746 | |||
| 747 | See the Fontconfig manual for a more detailed description of | ||
| 748 | Fontconfig patterns. This manual is located in the file | ||
| 749 | @file{fontconfig-user.html}, distributed with Fontconfig. It is also | ||
| 750 | available online at @url{http://fontconfig.org/fontconfig-user.html}. | ||
| 751 | In particular, that manual describes additional font properties that | ||
| 752 | influence how the font is hinted, antialiased, or scaled. | ||
| 753 | |||
| 754 | The second way to specify a font is to use a @dfn{GTK font | ||
| 755 | description}. These have the syntax | ||
| 756 | |||
| 757 | @smallexample | ||
| 758 | @var{fontname} [@var{properties}] [@var{fontsize}] | ||
| 759 | @end smallexample | ||
| 760 | |||
| 761 | @noindent | ||
| 762 | where @var{fontname} is the family name, @var{properties} is a list of | ||
| 763 | property values separated by spaces, and @var{fontsize} is the point | ||
| 764 | size. The properties that you may specify are as follows: | ||
| 765 | |||
| 766 | @table @samp | ||
| 767 | @item style | ||
| 768 | One of @samp{roman}, @samp{italic} or @samp{oblique}. If omitted, the | ||
| 769 | @samp{roman} style is used. | ||
| 770 | @item weight | ||
| 771 | One of @samp{medium}, @samp{ultra-light}, @samp{light}, | ||
| 772 | @samp{semi-bold}, or @samp{bold}. If omitted, @samp{medium} weight is | ||
| 773 | used. | ||
| 774 | @end table | ||
| 775 | |||
| 776 | @noindent | ||
| 777 | Here are some examples of GTK font descriptions: | ||
| 778 | |||
| 779 | @smallexample | ||
| 780 | Monospace 12 | ||
| 781 | Monospace Bold Italic 12 | ||
| 782 | @end smallexample | ||
| 783 | |||
| 784 | @cindex XLFD | ||
| 785 | @cindex X Logical Font Description | ||
| 786 | The third way to specify a font is to use an @dfn{XLFD} (@dfn{X | ||
| 787 | Logical Font Description}). This is the traditional method for | ||
| 788 | specifying fonts under X. Each XLFD consists of fourteen words or | ||
| 789 | numbers, separated by dashes, like this: | ||
| 790 | |||
| 791 | @smallexample | ||
| 792 | -misc-fixed-medium-r-semicondensed--13-*-*-*-c-60-iso8859-1 | ||
| 793 | @end smallexample | ||
| 794 | |||
| 795 | @noindent | ||
| 796 | A wildcard character (@samp{*}) in an XLFD matches any sequence of | ||
| 797 | characters (including none), and @samp{?} matches any single | ||
| 798 | character. However, matching is implementation-dependent, and can be | ||
| 799 | inaccurate when wildcards match dashes in a long name. For reliable | ||
| 800 | results, supply all 14 dashes and use wildcards only within a field. | ||
| 801 | Case is insignificant in an XLFD. The syntax for an XLFD is as | ||
| 802 | follows: | ||
| 803 | |||
| 804 | @smallexample | ||
| 805 | -@var{maker}-@var{family}-@var{weight}-@var{slant}-@var{widthtype}-@var{style}@dots{} | ||
| 806 | @dots{}-@var{pixels}-@var{height}-@var{horiz}-@var{vert}-@var{spacing}-@var{width}-@var{registry}-@var{encoding} | ||
| 807 | @end smallexample | ||
| 808 | |||
| 809 | @noindent | ||
| 810 | The entries have the following meanings: | ||
| 811 | |||
| 812 | @table @var | ||
| 813 | @item maker | ||
| 814 | The name of the font manufacturer. | ||
| 815 | @item family | ||
| 816 | The name of the font family (e.g. @samp{courier}). | ||
| 817 | @item weight | ||
| 818 | The font weight---normally either @samp{bold}, @samp{medium} or | ||
| 819 | @samp{light}. Some font names support other values. | ||
| 820 | @item slant | ||
| 821 | The font slant---normally @samp{r} (roman), @samp{i} (italic), | ||
| 822 | @samp{o} (oblique), @samp{ri} (reverse italic), or @samp{ot} (other). | ||
| 823 | Some font names support other values. | ||
| 824 | @item widthtype | ||
| 825 | The font width---normally @samp{condensed}, @samp{extended}, | ||
| 826 | @samp{semicondensed} or @samp{normal} (some font names support other | ||
| 827 | values). | ||
| 828 | @item style | ||
| 829 | An optional additional style name. Usually it is empty---most long | ||
| 830 | font names have two hyphens in a row at this point. | ||
| 831 | @item pixels | ||
| 832 | The font height, in pixels. | ||
| 833 | @item height | ||
| 834 | The font height on the screen, measured in tenths of a printer's | ||
| 835 | point. This is the point size of the font, times ten. For a given | ||
| 836 | vertical resolution, @var{height} and @var{pixels} are proportional; | ||
| 837 | therefore, it is common to specify just one of them and use @samp{*} | ||
| 838 | for the other. | ||
| 839 | @item horiz | ||
| 840 | The horizontal resolution, in pixels per inch, of the screen for which | ||
| 841 | the font is intended. | ||
| 842 | @item vert | ||
| 843 | The vertical resolution, in pixels per inch, of the screen for which | ||
| 844 | the font is intended. Normally the resolution of the fonts on your | ||
| 845 | system is the right value for your screen; therefore, you normally | ||
| 846 | specify @samp{*} for this and @var{horiz}. | ||
| 847 | @item spacing | ||
| 848 | This is @samp{m} (monospace), @samp{p} (proportional) or @samp{c} | ||
| 849 | (character cell). | ||
| 850 | @item width | ||
| 851 | The average character width, in pixels, multiplied by ten. | ||
| 852 | @item registry | ||
| 853 | @itemx encoding | ||
| 854 | The X font character set that the font depicts. (X font character | ||
| 855 | sets are not the same as Emacs character sets, but they are similar.) | ||
| 856 | You can use the @command{xfontsel} program to check which choices you | ||
| 857 | have. Normally you should use @samp{iso8859} for @var{registry} and | ||
| 858 | @samp{1} for @var{encoding}. | ||
| 859 | @end table | ||
| 860 | |||
| 861 | The fourth and final method of specifying a font is to use a ``font | ||
| 862 | nickname''. Certain fonts have shorter nicknames, which you can use | ||
| 863 | instead of a normal font specification. For instance, @samp{6x13} is | ||
| 864 | equivalent to | ||
| 865 | |||
| 866 | @smallexample | ||
| 867 | -misc-fixed-medium-r-semicondensed--13-*-*-*-c-60-iso8859-1 | ||
| 868 | @end smallexample | ||
| 869 | |||
| 870 | @cindex client-side fonts | ||
| 871 | @cindex server-side fonts | ||
| 872 | On X, Emacs recognizes two types of fonts: @dfn{client-side} fonts, | ||
| 873 | which are provided by the Xft and Fontconfig libraries, and | ||
| 874 | @dfn{server-side} fonts, which are provided by the X server itself. | ||
| 875 | Most client-side fonts support advanced font features such as | ||
| 876 | antialiasing and subpixel hinting, while server-side fonts do not. | ||
| 877 | Fontconfig and GTK patterns match only client-side fonts. | ||
| 878 | |||
| 879 | @cindex listing system fonts | ||
| 880 | You will probably want to use a fixed-width default font---that is, | ||
| 881 | a font in which all characters have the same width. For Xft and | ||
| 882 | Fontconfig fonts, you can use the @command{fc-list} command to list | ||
| 883 | the available fixed-width fonts, like this: | ||
| 884 | |||
| 885 | @example | ||
| 886 | fc-list :spacing=mono fc-list :spacing=charcell | ||
| 887 | @end example | ||
| 888 | |||
| 889 | @noindent | ||
| 890 | For server-side X fonts, you can use the @command{xlsfonts} program to | ||
| 891 | list the available fixed-width fonts, like this: | ||
| 892 | |||
| 893 | @example | ||
| 894 | xlsfonts -fn '*x*' | egrep "^[0-9]+x[0-9]+" | ||
| 895 | xlsfonts -fn '*-*-*-*-*-*-*-*-*-*-*-m*' | ||
| 896 | xlsfonts -fn '*-*-*-*-*-*-*-*-*-*-*-c*' | ||
| 897 | @end example | ||
| 898 | |||
| 899 | @noindent | ||
| 900 | Any font with @samp{m} or @samp{c} in the @var{spacing} field of the | ||
| 901 | XLFD is a fixed-width font. To see what a particular font looks like, | ||
| 902 | use the @command{xfd} command. For example: | ||
| 903 | |||
| 904 | @example | ||
| 905 | xfd -fn 6x13 | ||
| 906 | @end example | ||
| 907 | |||
| 908 | @noindent | ||
| 909 | displays the entire font @samp{6x13}. | ||
| 910 | |||
| 911 | While running Emacs, you can also set the font of a specific kind of | ||
| 912 | text (@pxref{Faces}), or a particular frame (@pxref{Frame | ||
| 913 | Parameters}). | ||
| 914 | |||
| 648 | @node Speedbar | 915 | @node Speedbar |
| 649 | @section Speedbar Frames | 916 | @section Speedbar Frames |
| 650 | @cindex speedbar | 917 | @cindex speedbar |
diff --git a/doc/emacs/mule.texi b/doc/emacs/mule.texi index 5eb1b66324f..00aa9047aec 100644 --- a/doc/emacs/mule.texi +++ b/doc/emacs/mule.texi | |||
| @@ -1442,7 +1442,7 @@ field. | |||
| 1442 | fontset is called @code{create-fontset-from-fontset-spec}. You can also | 1442 | fontset is called @code{create-fontset-from-fontset-spec}. You can also |
| 1443 | call this function explicitly to create a fontset. | 1443 | call this function explicitly to create a fontset. |
| 1444 | 1444 | ||
| 1445 | @xref{Font X}, for more information about font naming in X. | 1445 | @xref{Fonts}, for more information about font naming. |
| 1446 | 1446 | ||
| 1447 | @node Modifying Fontsets | 1447 | @node Modifying Fontsets |
| 1448 | @section Modifying Fontsets | 1448 | @section Modifying Fontsets |
| @@ -1619,7 +1619,7 @@ belong to one or more charsets. | |||
| 1619 | that you don't have to worry about them. However, it is sometimes | 1619 | that you don't have to worry about them. However, it is sometimes |
| 1620 | helpful to know some of the underlying details about charsets. | 1620 | helpful to know some of the underlying details about charsets. |
| 1621 | 1621 | ||
| 1622 | One example is font selection (@pxref{Font X}). Each language | 1622 | One example is font selection (@pxref{Fonts}). Each language |
| 1623 | environment (@pxref{Language Environments}) defines a ``priority | 1623 | environment (@pxref{Language Environments}) defines a ``priority |
| 1624 | list'' for the various charsets. When searching for a font, Emacs | 1624 | list'' for the various charsets. When searching for a font, Emacs |
| 1625 | initially attempts to find one that can display the highest-priority | 1625 | initially attempts to find one that can display the highest-priority |
diff --git a/doc/emacs/xresources.texi b/doc/emacs/xresources.texi index a6aa567741e..62f0448b92e 100644 --- a/doc/emacs/xresources.texi +++ b/doc/emacs/xresources.texi | |||
| @@ -193,7 +193,7 @@ Specifies whether to make the cursor blink. The default is @samp{on}. Use | |||
| 193 | @end ifnottex | 193 | @end ifnottex |
| 194 | 194 | ||
| 195 | @item @code{font} (class @code{Font}) | 195 | @item @code{font} (class @code{Font}) |
| 196 | Font name for the @code{default} font. @xref{Font X}. You can also | 196 | Font name for the @code{default} font. @xref{Fonts}. You can also |
| 197 | specify a fontset name (@pxref{Fontsets}). | 197 | specify a fontset name (@pxref{Fontsets}). |
| 198 | 198 | ||
| 199 | @item @code{fontBackend} (class @code{FontBackend}) | 199 | @item @code{fontBackend} (class @code{FontBackend}) |
| @@ -71,14 +71,14 @@ uses `system-move-file-to-trash' for trashing.) | |||
| 71 | Customize `make-pointer-invisible' to disable this feature. | 71 | Customize `make-pointer-invisible' to disable this feature. |
| 72 | 72 | ||
| 73 | ** Font changes | 73 | ** Font changes |
| 74 | 74 | +++ | |
| 75 | *** Emacs can use the system default monospaced font in Gnome. | 75 | *** Emacs can use the system default monospaced font in Gnome. |
| 76 | To enable this feature, set `font-use-system-font' to non-nil (it is | 76 | To enable this feature, set `font-use-system-font' to non-nil (it is |
| 77 | nil by default). If the system default changes, Emacs changes also. | 77 | nil by default). If the system default changes, Emacs changes also. |
| 78 | This feature requires Gconf support, which is automatically included | 78 | This feature requires Gconf support, which is automatically included |
| 79 | at compile-time if configure detects the gconf libraries (you can | 79 | at compile-time if configure detects the gconf libraries (you can |
| 80 | disable this with the configure option --without-gconf). | 80 | disable this with the configure option --without-gconf). |
| 81 | 81 | --- | |
| 82 | *** On X11, Emacs reacts to Xft changes made by configuration tools, | 82 | *** On X11, Emacs reacts to Xft changes made by configuration tools, |
| 83 | via the XSETTINGS mechanism. This includes antialias, hinting, | 83 | via the XSETTINGS mechanism. This includes antialias, hinting, |
| 84 | hintstyle, RGBA, DPI and lcdfilter changes. | 84 | hintstyle, RGBA, DPI and lcdfilter changes. |