aboutsummaryrefslogtreecommitdiffstats
path: root/doc
diff options
context:
space:
mode:
Diffstat (limited to 'doc')
-rw-r--r--doc/emacs/killing.texi2
-rw-r--r--doc/emacs/mule.texi84
-rw-r--r--doc/lispref/display.texi6
3 files changed, 68 insertions, 24 deletions
diff --git a/doc/emacs/killing.texi b/doc/emacs/killing.texi
index 834a5c6159d..6b1f35e6158 100644
--- a/doc/emacs/killing.texi
+++ b/doc/emacs/killing.texi
@@ -727,6 +727,8 @@ them. Rectangle commands are useful with text in multicolumn formats,
727and for changing text into or out of such formats. 727and for changing text into or out of such formats.
728 728
729@cindex mark rectangle 729@cindex mark rectangle
730@cindex region-rectangle
731@cindex rectangular region
730 To specify a rectangle for a command to work on, set the mark at one 732 To specify a rectangle for a command to work on, set the mark at one
731corner and point at the opposite corner. The rectangle thus specified 733corner and point at the opposite corner. The rectangle thus specified
732is called the @dfn{region-rectangle}. If point and the mark are in 734is called the @dfn{region-rectangle}. If point and the mark are in
diff --git a/doc/emacs/mule.texi b/doc/emacs/mule.texi
index e3fe20c76f8..373c7b55817 100644
--- a/doc/emacs/mule.texi
+++ b/doc/emacs/mule.texi
@@ -1326,16 +1326,17 @@ stored in the system and the available font names are defined by the
1326system, fontsets are defined within Emacs itself. Once you have 1326system, fontsets are defined within Emacs itself. Once you have
1327defined a fontset, you can use it within Emacs by specifying its name, 1327defined a fontset, you can use it within Emacs by specifying its name,
1328anywhere that you could use a single font. Of course, Emacs fontsets 1328anywhere that you could use a single font. Of course, Emacs fontsets
1329can use only the fonts that the system supports. If some characters 1329can use only the fonts that your system supports. If some characters
1330appear on the screen as empty boxes or hex codes, this means that the 1330appear on the screen as empty boxes or hex codes, this means that the
1331fontset in use for them has no font for those characters. In this 1331fontset in use for them has no font for those characters. In this
1332case, or if the characters are shown, but not as well as you would 1332case, or if the characters are shown, but not as well as you would
1333like, you may need to install extra fonts. Your operating system may 1333like, you may need to install extra fonts or modify the fontset to use
1334have optional fonts that you can install; or you can install the GNU 1334specific fonts already installed on your system (see below). Your
1335Intlfonts package, which includes fonts for most supported 1335operating system may have optional fonts that you can install; or you
1336scripts.@footnote{If you run Emacs on X, you may need to inform the X 1336can install the GNU Intlfonts package, which includes fonts for most
1337server about the location of the newly installed fonts with commands 1337supported scripts.@footnote{If you run Emacs on X, you may need to
1338such as: 1338inform the X server about the location of the newly installed fonts
1339with commands such as:
1339@c FIXME? I feel like this may be out of date. 1340@c FIXME? I feel like this may be out of date.
1340@c E.g., the intlfonts tarfile is ~ 10 years old. 1341@c E.g., the intlfonts tarfile is ~ 10 years old.
1341 1342
@@ -1376,14 +1377,20 @@ explicitly requested, despite its name.
1376@w{@kbd{M-x describe-fontset}} command. It prompts for a fontset 1377@w{@kbd{M-x describe-fontset}} command. It prompts for a fontset
1377name, defaulting to the one used by the current frame, and then 1378name, defaulting to the one used by the current frame, and then
1378displays all the subranges of characters and the fonts assigned to 1379displays all the subranges of characters and the fonts assigned to
1379them in that fontset. 1380them in that fontset. To see which fonts Emacs is using in a session
1381started without a specific fontset (which is what happens normally),
1382type @kbd{fontset-default @key{RET}} at the prompt, or just
1383@kbd{@key{RET}} to describe the fontset used by the current frame.
1380 1384
1381 A fontset does not necessarily specify a font for every character 1385 A fontset does not necessarily specify a font for every character
1382code. If a fontset specifies no font for a certain character, or if 1386code. If a fontset specifies no font for a certain character, or if
1383it specifies a font that does not exist on your system, then it cannot 1387it specifies a font that does not exist on your system, then it cannot
1384display that character properly. It will display that character as a 1388display that character properly. It will display that character as a
1385hex code or thin space or an empty box instead. (@xref{Text Display, , 1389hex code or thin space or an empty box instead. (@xref{Text Display,
1386glyphless characters}, for details.) 1390, glyphless characters}, for details.) Or a fontset might specify a
1391font for some range of characters, but you may not like their visual
1392appearance. If this happens, you may wish to modify your fontset; see
1393@ref{Modifying Fontsets}, for how to do that.
1387 1394
1388@node Defining Fontsets 1395@node Defining Fontsets
1389@section Defining Fontsets 1396@section Defining Fontsets
@@ -1542,10 +1549,10 @@ call this function explicitly to create a fontset.
1542 1549
1543 Fontsets do not always have to be created from scratch. If only 1550 Fontsets do not always have to be created from scratch. If only
1544minor changes are required it may be easier to modify an existing 1551minor changes are required it may be easier to modify an existing
1545fontset. Modifying @samp{fontset-default} will also affect other 1552fontset, usually @samp{fontset-default}. Modifying
1546fontsets that use it as a fallback, so can be an effective way of 1553@samp{fontset-default} will also affect other fontsets that use it as
1547fixing problems with the fonts that Emacs chooses for a particular 1554a fallback, so can be an effective way of fixing problems with the
1548script. 1555fonts that Emacs chooses for a particular script.
1549 1556
1550Fontsets can be modified using the function @code{set-fontset-font}, 1557Fontsets can be modified using the function @code{set-fontset-font},
1551specifying a character, a charset, a script, or a range of characters 1558specifying a character, a charset, a script, or a range of characters
@@ -1553,26 +1560,61 @@ to modify the font for, and a font specification for the font to be
1553used. Some examples are: 1560used. Some examples are:
1554 1561
1555@example 1562@example
1556;; Use Liberation Mono for latin-3 charset.
1557(set-fontset-font "fontset-default" 'iso-8859-3
1558 "Liberation Mono")
1559
1560;; Prefer a big5 font for han characters. 1563;; Prefer a big5 font for han characters.
1561(set-fontset-font "fontset-default" 1564(set-fontset-font "fontset-default"
1562 'han (font-spec :registry "big5") 1565 'han (font-spec :registry "big5")
1563 nil 'prepend) 1566 nil 'prepend)
1564 1567
1568;; Use MyPrivateFont for the Unicode private use area.
1569(set-fontset-font "fontset-default" '(#xe000 . #xf8ff)
1570 "MyPrivateFont")
1571
1572;; Use Liberation Mono for latin-3 charset.
1573(set-fontset-font "fontset-default" 'iso-8859-3
1574 "Liberation Mono")
1575
1565;; Use DejaVu Sans Mono as a fallback in fontset-startup 1576;; Use DejaVu Sans Mono as a fallback in fontset-startup
1566;; before resorting to fontset-default. 1577;; before resorting to fontset-default.
1567(set-fontset-font "fontset-startup" nil "DejaVu Sans Mono" 1578(set-fontset-font "fontset-startup" nil "DejaVu Sans Mono"
1568 nil 'append) 1579 nil 'append)
1580@end example
1569 1581
1570;; Use MyPrivateFont for the Unicode private use area. 1582@noindent
1571(set-fontset-font "fontset-default" '(#xe000 . #xf8ff) 1583@xref{Fontsets, , , elisp, GNU Emacs Lisp Reference Manual}, for more
1572 "MyPrivateFont") 1584details about using the @code{set-fontset-font} function.
1585
1586@cindex script of a character
1587@cindex codepoint of a character
1588If you don't know the character's codepoint or the script to which it
1589belongs, you can ask Emacs. With point at the character, type
1590@w{@kbd{C-u C-x =}} (@code{what-cursor-position}), and this
1591information, together with much more, will be displayed in the
1592@file{*Help*} buffer that Emacs pops up. @xref{Position Info}. For
1593example, Japanese characters belong to the @samp{kana} script, but
1594Japanese text also mixes them with Chinese characters so the following
1595uses the @samp{han} script to set up Emacs to use the @samp{Kochi
1596Gothic} font for Japanese text:
1573 1597
1598@example
1599(set-fontset-font "fontset-default" 'han "Kochi Gothic")
1574@end example 1600@end example
1575 1601
1602@noindent
1603@cindex CKJ characters
1604(For convenience, the @samp{han} script in Emacs is set up to support
1605all of the Chinese, Japanese, and Korean, a.k.a.@: @acronym{CJK},
1606characters, not just Chinese characters.)
1607
1608@vindex script-representative-chars
1609For the list of known scripts, see the variable
1610@code{script-representative-chars}.
1611
1612Fontset settings like those above only affect characters that the
1613default font doesn't support, so if the @samp{Kochi Gothic} font
1614covers Latin characters, it will not be used for displaying Latin
1615scripts, since the default font used by Emacs usually covers Basic
1616Latin.
1617
1576@cindex ignore font 1618@cindex ignore font
1577@cindex fonts, how to ignore 1619@cindex fonts, how to ignore
1578@vindex face-ignored-fonts 1620@vindex face-ignored-fonts
diff --git a/doc/lispref/display.texi b/doc/lispref/display.texi
index e53f0e9f60c..3d738b9965f 100644
--- a/doc/lispref/display.texi
+++ b/doc/lispref/display.texi
@@ -3597,9 +3597,9 @@ characters in the range @var{from} and @var{to} (inclusive).
3597@var{character} may be a charset (@pxref{Character Sets}). In that 3597@var{character} may be a charset (@pxref{Character Sets}). In that
3598case, use @var{font-spec} for all the characters in the charset. 3598case, use @var{font-spec} for all the characters in the charset.
3599 3599
3600@var{character} may be a script name (@pxref{Character Properties}). 3600@var{character} may be a script name (@pxref{Character Properties,
3601In that case, use @var{font-spec} for all the characters belonging to 3601char-script-table}). In that case, use @var{font-spec} for all the
3602the script. 3602characters belonging to the script.
3603 3603
3604@var{character} may be @code{nil}, which means to use @var{font-spec} 3604@var{character} may be @code{nil}, which means to use @var{font-spec}
3605for any character which no font-spec is specified. 3605for any character which no font-spec is specified.