Show
Ignore:
Timestamp:
08/18/06 08:35:31 (2 years ago)
Author:
miyoshi
Message:

Sync up with Emacs CVS HEAD.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/man/faq.texi

    r4140 r4148  
    48744874* Kanji and Chinese characters:: 
    48754875* Right-to-left alphabets:: 
     4876* How to add fonts:: 
    48764877@end menu 
    48774878 
     
    49134914to find and download the latest version of Emacs. 
    49144915 
    4915 @node Right-to-left alphabets, , Kanji and Chinese characters, Alternate character sets 
     4916@node Right-to-left alphabets, How to add fonts, Kanji and Chinese characters, Alternate character sets 
    49164917@section Where is an Emacs that can handle Semitic (right-to-left) alphabets? 
    49174918@cindex Right-to-left alphabets 
     
    49334934Joel has a screen font for PCs running MS-DOS or GNU/Linux. 
    49344935 
    4935 You might also try to query archie for files named with @file{hebrew}; 
    4936 several ftp sites in Israel may also have the necessary files. 
     4936You might also try querying @code{archie} for files named with 
     4937@file{hebrew}; several ftp sites in Israel may also have the necessary 
     4938files. 
     4939 
     4940@node How to add fonts,  , Right-to-left alphabets, Alternate character sets 
     4941@section How do I add fonts for use with Emacs? 
     4942@cindex add fonts for use with Emacs 
     4943@cindex intlfonts 
     4944 
     4945First, download and install the BDF font files and any auxiliary 
     4946packages they need.  The GNU Intlfonts distribution can be found on 
     4947@uref{http://directory.fsf.org/localization/intlfonts.html, the GNU 
     4948Software Directory Web site}. 
     4949 
     4950Next, if you are on X Window system, issue the following two commands 
     4951from the shell's prompt: 
     4952 
     4953@example 
     4954  xset +fp /usr/local/share/emacs/fonts 
     4955  xset fp rehash 
     4956@end example 
     4957 
     4958@noindent 
     4959(Modify the first command if you installed the fonts in a directory 
     4960that is not @file{/usr/local/share/emacs/fonts}.)  You also need to 
     4961arrange for these two commands to run whenever you log in, e.g., by 
     4962adding them to your window-system startup file, such as 
     4963@file{~/.xsessionrc} or @file{~/.gnomerc}. 
     4964 
     4965Now, add the following line to your @file{~/.emacs} init file: 
     4966 
     4967@lisp 
     4968  (add-to-list 'bdf-directory-list "/usr/share/emacs/fonts/bdf") 
     4969@end lisp 
     4970 
     4971@noindent 
     4972(Again, modify the file name if you installed the fonts elsewhere.) 
     4973 
     4974Finally, if you wish to use the installed fonts with @code{ps-print}, 
     4975add the following line to your @file{~/.emacs}: 
     4976 
     4977@lisp 
     4978  (setq ps-multibyte-buffer 'bdf-font-except-latin) 
     4979@end lisp 
     4980 
     4981A few additional steps are necessary for MS-Windows; they are listed 
     4982below. 
     4983 
     4984First, make sure @emph{all} the directories with BDF font files are 
     4985mentioned in @code{bdf-directory-list}.  On Unix and GNU/Linux 
     4986systems, one normally runs @kbd{make install} to install the BDF fonts 
     4987in the same directory.  By contrast, Windows users typically don't run 
     4988the Intlfonts installation command, but unpack the distribution in 
     4989some directory, which leaves the BDF fonts in its subdirectories.  For 
     4990example, assume that you unpacked Intlfonts in @file{C:/Intlfonts}; 
     4991then you should set @code{bdf-directory-list} as follows: 
     4992 
     4993@lisp 
     4994  (setq bdf-directory-list 
     4995    '("C:/Intlfonts/Asian" 
     4996      "C:/Intlfonts/Chinese" "C:/Intlfonts/Chinese.X" 
     4997      "C:/Intlfonts/Chinese.BIG" "C:/Intlfonts/Ethiopic" 
     4998      "C:/Intlfonts/European" "C:/Intlfonts/European.BIG" 
     4999      "C:/Intlfonts/Japanese" "C:/Intlfonts/Japanese.X" 
     5000      "C:/Intlfonts/Japanese.BIG" "C:/Intlfonts/Korean.X" 
     5001      "C:/Intlfonts/Misc")) 
     5002@end lisp 
     5003 
     5004@cindex @code{w32-bdf-filename-alist} 
     5005@cindex @code{w32-find-bdf-fonts} 
     5006Next, you need to set up the variable @code{w32-bdf-filename-alist} to 
     5007an alist of the BDF fonts and their corresponding file names. 
     5008Assuming you have set @code{bdf-directory-list} to name all the 
     5009directories with the BDF font files, the following Lisp snippet will 
     5010set up @code{w32-bdf-filename-alist}: 
     5011 
     5012@lisp 
     5013  (setq w32-bdf-filename-alist 
     5014     (w32-find-bdf-fonts bdf-directory-list)) 
     5015@end lisp 
     5016 
     5017Now, create fontsets for the BDF fonts: 
     5018 
     5019@lisp 
     5020  (create-fontset-from-fontset-spec 
     5021   "-*-fixed-medium-r-normal-*-16-*-*-*-c-*-fontset-bdf, 
     5022   japanese-jisx0208:-*-*-medium-r-normal-*-16-*-*-*-c-*-jisx0208.1983-*, 
     5023   katakana-jisx0201:-*-*-medium-r-normal-*-16-*-*-*-c-*-jisx0201*-*, 
     5024   latin-jisx0201:-*-*-medium-r-normal-*-16-*-*-*-c-*-jisx0201*-*, 
     5025   japanese-jisx0208-1978:-*-*-medium-r-normal-*-16-*-*-*-c-*-jisx0208.1978-*, 
     5026   thai-tis620:-misc-fixed-medium-r-normal--16-160-72-72-m-80-tis620.2529-1, 
     5027   lao:-misc-fixed-medium-r-normal--16-160-72-72-m-80-MuleLao-1, 
     5028   tibetan-1-column:-TibMdXA-fixed-medium-r-normal--16-160-72-72-m-80-MuleTibetan-1, 
     5029   ethiopic:-Admas-Ethiomx16f-Medium-R-Normal--16-150-100-100-M-160-Ethiopic-Unicode, 
     5030   tibetan:-TibMdXA-fixed-medium-r-normal--16-160-72-72-m-160-MuleTibetan-0") 
     5031@end lisp 
     5032 
     5033Many of the international bdf fonts from Intlfonts are type 0, and 
     5034therefore need to be added to font-encoding-alist: 
     5035 
     5036@lisp 
     5037  (setq font-encoding-alist 
     5038        (append '(("MuleTibetan-0" (tibetan . 0)) 
     5039                  ("GB2312"        (chinese-gb2312 . 0)) 
     5040                  ("JISX0208"      (japanese-jisx0208 . 0)) 
     5041                  ("JISX0212"      (japanese-jisx0212 . 0)) 
     5042                  ("VISCII"        (vietnamese-viscii-lower . 0)) 
     5043                  ("KSC5601"       (korean-ksc5601 . 0)) 
     5044                  ("MuleArabic-0"  (arabic-digit . 0)) 
     5045                  ("MuleArabic-1"  (arabic-1-column . 0)) 
     5046                  ("MuleArabic-2"  (arabic-2-column . 0))) 
     5047                font-encoding-alist)) 
     5048@end lisp 
     5049 
     5050You can now use the Emacs font menu to select the @samp{bdf: 16-dot medium} 
     5051fontset, or you can select it by setting the default font in your 
     5052@file{~/.emacs}: 
     5053 
     5054@lisp 
     5055  (set-default-font "fontset-bdf") 
     5056@end lisp 
     5057 
    49375058 
    49385059@c ------------------------------------------------------------