# HG changeset patch # User Kenichi Handa # Date 1236920824 0 # Node ID 34182d9c3399d7fe282a48a7420a3e0690611565 # Parent 5dd30d203ccbfbf717315b6bc82f07e46b45c4c8 (Fontsets): Update the description. diff -r 5dd30d203ccb -r 34182d9c3399 doc/lispref/display.texi --- a/doc/lispref/display.texi Fri Mar 13 01:59:25 2009 +0000 +++ b/doc/lispref/display.texi Fri Mar 13 05:07:04 2009 +0000 @@ -2883,32 +2883,48 @@ Chinese GB2312 characters has a wild card @samp{*} in the @var{family} field. -@defun set-fontset-font name character fontname &optional frame -This function modifies the existing fontset @var{name} to -use the font name @var{fontname} for the character @var{character}. - -If @var{name} is @code{nil}, this function modifies the default +@defun set-fontset-font name character font-spec &optional frame add +This function modifies the existing fontset @var{name} to use the font +matching with @var{font-spec} for the character @var{character}. + +If @var{name} is @code{nil}, this function modifies the fontset of the +selected frame or that of @var{frame} if @var{frame} is not +@code{nil}. + +If @var{name} is @code{t}, this function modifies the default fontset, whose short name is @samp{fontset-default}. @var{character} may be a cons; @code{(@var{from} . @var{to})}, where @var{from} and @var{to} are character codepoints. In that case, use -@var{fontname} for all characters in the range @var{from} and @var{to} +@var{font-spec} for all characters in the range @var{from} and @var{to} (inclusive). @var{character} may be a charset. In that case, use -@var{fontname} for all character in the charsets. - -@var{fontname} may be a cons; @code{(@var{family} . @var{registry})}, +@var{font-spec} for all character in the charsets. + +@var{character} may be a script anme. In that case, use +@var{font-spec} for all character in the charsets. + +@var{font-spec} may be a cons; @code{(@var{family} . @var{registry})}, where @var{family} is a family name of a font (possibly including a foundry name at the head), @var{registry} is a registry name of a font (possibly including an encoding name at the tail). +@var{font-spec} may be a font name string. + +The optional argument @var{add}, if non-@code{nil}, specifies how to +add @var{font-spec} to the font specifications previously set. If it +is @code{prepend}, @var{font-spec} is prepended. If it is +@code{append}, @var{font-spec} is appended. By default, +@var{font-spec} overrides the previous settings. + For instance, this changes the default fontset to use a font of which -registry name is @samp{JISX0208.1983} for all characters belonging to +family name is @samp{Kochi Gothic} for all characters belonging to the charset @code{japanese-jisx0208}. @smallexample -(set-fontset-font nil 'japanese-jisx0208 '(nil . "JISX0208.1983")) +(set-fontset-font t 'japanese-jisx0208 + (font-spec :family "Kochi Gothic")) @end smallexample @end defun