diff options
| author | Richard M. Stallman | 2002-09-14 17:36:44 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 2002-09-14 17:36:44 +0000 |
| commit | bbf77fe8902e0ae9467b679071302d82ed28d1bd (patch) | |
| tree | fdb20936db0ef51d4490868f74b25376e4842428 | |
| parent | bf2a6c399cf5f48ba47eaa5133c009a271e98401 (diff) | |
| download | emacs-bbf77fe8902e0ae9467b679071302d82ed28d1bd.tar.gz emacs-bbf77fe8902e0ae9467b679071302d82ed28d1bd.zip | |
Correct the explanation of glyphs and glyph table.
| -rw-r--r-- | lispref/display.texi | 50 |
1 files changed, 29 insertions, 21 deletions
diff --git a/lispref/display.texi b/lispref/display.texi index 0d4cfd88f76..acbabfcb2e9 100644 --- a/lispref/display.texi +++ b/lispref/display.texi | |||
| @@ -3380,17 +3380,36 @@ are defined in the library @file{disp-table}. | |||
| 3380 | @cindex glyph | 3380 | @cindex glyph |
| 3381 | A @dfn{glyph} is a generalization of a character; it stands for an | 3381 | A @dfn{glyph} is a generalization of a character; it stands for an |
| 3382 | image that takes up a single character position on the screen. Glyphs | 3382 | image that takes up a single character position on the screen. Glyphs |
| 3383 | are represented in Lisp as integers, just as characters are. | 3383 | are represented in Lisp as integers, just as characters are. Normally |
| 3384 | Emacs finds glyphs in the display table (@pxref{Display Tables}). | ||
| 3385 | |||
| 3386 | A glyph can be @dfn{simple} or it can be defined by the @dfn{glyph | ||
| 3387 | table}. A simple glyph is just a way of specifying a character and a | ||
| 3388 | face to output it in. The glyph code for a simple glyph, mod 524288, | ||
| 3389 | is the character to output, and the glyph code divided by 524288 | ||
| 3390 | specifies the face number (@pxref{Face Functions}) to use while | ||
| 3391 | outputting it. (524288 is | ||
| 3392 | @ifnottex | ||
| 3393 | 2**19.) | ||
| 3394 | @end ifnottex | ||
| 3395 | @tex | ||
| 3396 | $2^{19}$.) | ||
| 3397 | @end tex | ||
| 3398 | @xref{Faces}. | ||
| 3384 | 3399 | ||
| 3385 | @cindex glyph table | 3400 | On character terminals, you can set up a @dfn{glyph table} to define |
| 3386 | The meaning of each integer, as a glyph, is defined by the glyph | 3401 | the meaning of glyph codes. The glyph codes is the value of the |
| 3387 | table, which is the value of the variable @code{glyph-table}. | 3402 | variable @code{glyph-table}. |
| 3388 | 3403 | ||
| 3389 | @defvar glyph-table | 3404 | @defvar glyph-table |
| 3390 | The value of this variable is the current glyph table. It should be a | 3405 | The value of this variable is the current glyph table. It should be a |
| 3391 | vector; the @var{g}th element defines glyph code @var{g}. If the value | 3406 | vector; the @var{g}th element defines glyph code @var{g}. |
| 3392 | is @code{nil} instead of a vector, then all glyphs are simple (see | 3407 | |
| 3393 | below). The glyph table is not used on windowed displays. | 3408 | If a glyph code is greater than or equal to the length of the glyph |
| 3409 | table, that code is automatically simple. If the value of | ||
| 3410 | @code{glyph-table} is @code{nil} instead of a vector, then all glyphs | ||
| 3411 | are simple. The glyph table is not used on graphical displays, only | ||
| 3412 | on character terminals. On graphical displays, all glyphs are simple. | ||
| 3394 | @end defvar | 3413 | @end defvar |
| 3395 | 3414 | ||
| 3396 | Here are the possible types of elements in the glyph table: | 3415 | Here are the possible types of elements in the glyph table: |
| @@ -3403,24 +3422,13 @@ but not under a window system. | |||
| 3403 | 3422 | ||
| 3404 | @item @var{integer} | 3423 | @item @var{integer} |
| 3405 | Define this glyph code as an alias for glyph code @var{integer}. You | 3424 | Define this glyph code as an alias for glyph code @var{integer}. You |
| 3406 | can use an alias to specify a face code for the glyph; see below. | 3425 | can use an alias to specify a face code for the glyph and use a small |
| 3426 | number as its code. | ||
| 3407 | 3427 | ||
| 3408 | @item @code{nil} | 3428 | @item @code{nil} |
| 3409 | This glyph is simple. The glyph code mod 524288 is the character to | 3429 | This glyph is simple. |
| 3410 | output, and the glyph code divided by 524288 specifies the face number | ||
| 3411 | (@pxref{Face Functions}) to use while outputting it. (524288 is | ||
| 3412 | @ifnottex | ||
| 3413 | 2**19.) | ||
| 3414 | @end ifnottex | ||
| 3415 | @tex | ||
| 3416 | $2^{19}$.) | ||
| 3417 | @end tex | ||
| 3418 | @xref{Faces}. | ||
| 3419 | @end table | 3430 | @end table |
| 3420 | 3431 | ||
| 3421 | If a glyph code is greater than or equal to the length of the glyph | ||
| 3422 | table, that code is automatically simple. | ||
| 3423 | |||
| 3424 | @defun create-glyph string | 3432 | @defun create-glyph string |
| 3425 | @tindex create-glyph | 3433 | @tindex create-glyph |
| 3426 | This function returns a newly-allocated glyph code which is set up to | 3434 | This function returns a newly-allocated glyph code which is set up to |