[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] emacs/doc/emacs ChangeLog mule.texi
From: |
Jason Rumney |
Subject: |
[Emacs-diffs] emacs/doc/emacs ChangeLog mule.texi |
Date: |
Tue, 24 Feb 2009 13:33:58 +0000 |
CVSROOT: /sources/emacs
Module name: emacs
Changes by: Jason Rumney <jasonr> 09/02/24 13:33:58
Modified files:
doc/emacs : ChangeLog mule.texi
Log message:
(Fontsets): Mention fontset-default, font specs and fallback fontsets.
(Defining Fontsets): Mention ns and w32 variants of
standard-fontset-spec.
Update description of startup fontset to match Emacs 23 behavior.
(Modifying Fontsets): New section.
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/emacs/doc/emacs/ChangeLog?cvsroot=emacs&r1=1.287&r2=1.288
http://cvs.savannah.gnu.org/viewcvs/emacs/doc/emacs/mule.texi?cvsroot=emacs&r1=1.10&r2=1.11
Patches:
Index: ChangeLog
===================================================================
RCS file: /sources/emacs/emacs/doc/emacs/ChangeLog,v
retrieving revision 1.287
retrieving revision 1.288
diff -u -b -r1.287 -r1.288
--- ChangeLog 23 Feb 2009 08:07:31 -0000 1.287
+++ ChangeLog 24 Feb 2009 13:33:58 -0000 1.288
@@ -1,3 +1,12 @@
+2009-02-24 Jason Rumney <address@hidden>
+
+ * mule.texi (Fontsets): Mention fontset-default, font specs and
+ fallback fontsets.
+ (Defining Fontsets): Mention ns and w32 variants of
+ standard-fontset-spec. Update description of startup fontset to match
+ Emacs 23 behavior.
+ (Modifying Fontsets): New section.
+
2009-02-23 Adrian Robert <address@hidden>
* macos.texi (Mac / GNUstep Basics, Mac / GNUstep Customization):
Index: mule.texi
===================================================================
RCS file: /sources/emacs/emacs/doc/emacs/mule.texi,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -b -r1.10 -r1.11
--- mule.texi 8 Jan 2009 05:28:51 -0000 1.10
+++ mule.texi 24 Feb 2009 13:33:58 -0000 1.11
@@ -1333,8 +1333,10 @@
A font typically defines shapes for a single alphabet or script.
Therefore, displaying the entire range of scripts that Emacs supports
requires a collection of many fonts. In Emacs, such a collection is
-called a @dfn{fontset}. A fontset is defined by a list of fonts, each
-assigned to handle a range of character codes.
+called a @dfn{fontset}. A fontset is defined by a list of font specs,
+each assigned to handle a range of character codes, and may fall back
+on another fontset for characters which are not covered by the fonts
+it specifies.
Each fontset has a name, like a font. However, while fonts are
stored in the system and the available font names are defined by the
@@ -1347,11 +1349,15 @@
installation instructions have information on additional font
support.}
- Emacs creates two fontsets automatically: the @dfn{standard fontset}
-and the @dfn{startup fontset}. The standard fontset is most likely to
-have fonts for a wide variety of address@hidden characters;
-however, this is not the default for Emacs to use. (By default, Emacs
-tries to find a font that has bold and italic variants.) You can
+ Emacs creates three fontsets automatically: the @dfn{standard
+fontset}, the @dfn{startup fontset} and the @dfn{default fontset}.
+The default fontset is most likely to have fonts for a wide variety of
address@hidden characters and is the default fallback for the
+other two fontsets, and if you set a default font rather than fontset.
+However it does not specify font family names, so results can be
+somewhat random if you use it directly. The standard fontset merely
+falls back on the default fontset without defining any modifications
+of its own, and is defined for backwards compatibility. You can
specify use of the standard fontset with the @samp{-fn} option. For
example,
@@ -1373,8 +1379,10 @@
@section Defining fontsets
@vindex standard-fontset-spec
address@hidden w32-standard-fontset-spec
address@hidden ns-standard-fontset-spec
@cindex standard fontset
- Emacs creates a standard fontset automatically according to the value
+ When running on X, Emacs creates a standard fontset automatically according
to the value
of @code{standard-fontset-spec}. This fontset's name is
@example
@@ -1384,19 +1392,23 @@
@noindent
or just @samp{fontset-standard} for short.
+ On GNUstep and Mac, fontset-standard is created using the value of
address@hidden, and on Windows it is
+created using the value of @code{w32-standard-fontset-spec}.
+
Bold, italic, and bold-italic variants of the standard fontset are
created automatically. Their names have @samp{bold} instead of
@samp{medium}, or @samp{i} instead of @samp{r}, or both.
@cindex startup fontset
- If you specify a default @acronym{ASCII} font with the @samp{Font} resource
or
-the @samp{-fn} argument, Emacs generates a fontset from it
-automatically. This is the @dfn{startup fontset} and its name is
address@hidden It does this by replacing the @var{foundry},
address@hidden, @var{add_style}, and @var{average_width} fields of the
-font name with @samp{*}, replacing @var{charset_registry} field with
address@hidden, and replacing @var{charset_encoding} field with
address@hidden, then using the resulting string to specify a fontset.
+ Emacs generates a fontset automatically, based on any default
address@hidden font that you specify with the @samp{Font} resource or
+the @samp{-fn} argument, or the default font that Emacs found when it
+started. This is the @dfn{startup fontset} and its name is
address@hidden It does this by replacing the
address@hidden field with @samp{fontset}, and replacing
address@hidden field with @samp{startup}, then using the
+resulting string to specify a fontset.
For instance, if you start Emacs this way,
@@ -1409,9 +1421,14 @@
window frame:
@example
--*-*-medium-r-normal-*-14-140-*-*-*-*-fontset-startup
+-*-courier-medium-r-normal-*-14-140-*-*-*-*-fontset-startup
@end example
+ The startup fontset will use the font that you specify or a variant
+with a different registry and encoding for all the characters which
+are supported by that font, and fallback on @samp{fontset-default} for
+other characters.
+
With the X resource @samp{Emacs.Font}, you can specify a fontset name
just like an actual font name. But be careful not to specify a fontset
name in a wildcard resource like @samp{Emacs*Font}---that wildcard
@@ -1496,6 +1513,41 @@
@xref{Font X}, for more information about font naming in X.
address@hidden Modifying Fontsets
address@hidden Modifying Fontsets
address@hidden fontsets, modifying
address@hidden set-fontset-font
+
+ Fontsets do not always have to be created from scratch. If only
+minor changes are required it may be easier to modify an existing
+fontset. Modifying @samp{fontset-default} will also affect other
+fontsets that use it as a fallback, so can be an effective way of
+fixing problems with the fonts that Emacs chooses for a particular
+script.
+
+Fontsets can be modified using the function @code{set-fontset-font},
+specifying a character, a charset, a script, or a range of characters
+to modify the font for, and a font-spec for the font to be used. Some
+examples are:
+
address@hidden
+;; Use Liberation Mono for latin-3 charset.
+(set-fontset-font "fontset-default" 'iso-8859-3 "Liberation Mono")
+
+;; Prefer a big5 font for han characters
+(set-fontset-font "fontset-default" 'han (font-spec :registry "big5")
+ nil 'prepend)
+
+;; Use DejaVu Sans Mono as a fallback in fontset-startup before
+;; resorting to fontset-default.
+(set-fontset-font "fontset-startup" nil "DejaVu Sans Mono" nil 'append)
+
+;; Use MyPrivateFont for the Unicode private use area.
+(set-fontset-font "fontset-default" '(#xe000 . #xf8ff) "MyPrivateFont")
+
address@hidden example
+
+
@node Undisplayable Characters
@section Undisplayable Characters
- [Emacs-diffs] emacs/doc/emacs ChangeLog mule.texi,
Jason Rumney <=