From d6eb4e250a6a5918f093b5e8dc5906a5cf598b6f Mon Sep 17 00:00:00 2001 From: Kenichi Handa Date: Fri, 13 Mar 2009 05:07:14 +0000 Subject: [PATCH] (Fontsets): Update the description. --- doc/lispref/ChangeLog | 4 ++++ doc/lispref/display.texi | 34 +++++++++++++++++++++++++--------- 2 files changed, 29 insertions(+), 9 deletions(-) diff --git a/doc/lispref/ChangeLog b/doc/lispref/ChangeLog index 5aae4f93136..726e43ea4b0 100644 --- a/doc/lispref/ChangeLog +++ b/doc/lispref/ChangeLog @@ -1,3 +1,7 @@ +2009-03-13 Kenichi Handa + + * display.texi (Fontsets): Update the description. + 2009-03-13 Chong Yidong * advice.texi (Advising Primitives): Link to What Is a Function. diff --git a/doc/lispref/display.texi b/doc/lispref/display.texi index 5cc28d3a1dc..e5c257f0b23 100644 --- a/doc/lispref/display.texi +++ b/doc/lispref/display.texi @@ -2883,32 +2883,48 @@ Then, the font specifications for all but Chinese GB2312 characters have 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}. +@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 default +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{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{fontname} may be a cons; @code{(@var{family} . @var{registry})}, +@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 -- 2.39.5