summaryrefslogtreecommitdiff
path: root/lispref
diff options
context:
space:
mode:
authorKim F. Storm <storm@cua.dk>2007-02-14 11:31:28 +0000
committerKim F. Storm <storm@cua.dk>2007-02-14 11:31:28 +0000
commit663320a4ffbb84de0f0eb960af7ef109a97d8bf6 (patch)
treef614326af5f88728eb0da0c3049ada2792f52d68 /lispref
parent9a184b00295e9960b7949712347c349df6fddf5c (diff)
downloademacs-663320a4ffbb84de0f0eb960af7ef109a97d8bf6.tar.gz
(Glyphs): Add make-glyph-code, glyph-char, glyph-face.
Rewrite glyph code description to refer to these functions. Remove details of encoding face number and char into integer code.
Diffstat (limited to 'lispref')
-rw-r--r--lispref/display.texi46
1 files changed, 26 insertions, 20 deletions
diff --git a/lispref/display.texi b/lispref/display.texi
index e2b71f45421..02491c422d9 100644
--- a/lispref/display.texi
+++ b/lispref/display.texi
@@ -5266,26 +5266,32 @@ are defined in the library @file{disp-table}.
@cindex glyph
A @dfn{glyph} is a generalization of a character; it stands for an
-image that takes up a single character position on the screen. Glyphs
-are represented in Lisp as integers, just as characters are. Normally
+image that takes up a single character position on the screen. Normally
glyphs come from vectors in the display table (@pxref{Display Tables}).
- A glyph code can be @dfn{simple} or it can be defined by the
-@dfn{glyph table}. A simple glyph code is just a way of specifying a
-character and a face to output it in. When a glyph code is simple,
-the code, mod 524288, is the character to output, and the code divided
-by 524288 specifies the face number (@pxref{Face Functions}) to use
-while outputting it. (524288 is
-@ifnottex
-2**19.)
-@end ifnottex
-@tex
-$2^{19}$.)
-@end tex
-@xref{Faces}.
+ A glyph is represented in Lisp as a @dfn{glyph code}. A glyph code
+can be @dfn{simple} or it can be defined by the @dfn{glyph table}. A
+simple glyph code is just a way of specifying a character and a face
+to output it in. @xref{Faces}.
+
+ The following functions are used to manipulate simple glyph codes:
+
+@defun make-glyph-code char &optional face
+This function returns a simple glyph code representing char @var{char}
+with face @var{face}.
+@end defun
+
+@defun glyph-char glyph
+This function returns the character of simple glyph code @var{glyph}.
+@end defun
+
+@defun glyph-face glyph
+This function returns face of simple glyph code @var{glyph}, or
+@code{nil} if @var{glyph} has the default face (face-id 0).
+@end defun
On character terminals, you can set up a @dfn{glyph table} to define
-the meaning of glyph codes.
+the meaning of glyph codes (represented as small integers).
@defvar glyph-table
The value of this variable is the current glyph table. It should be
@@ -5307,10 +5313,10 @@ displays, all glyph codes are simple.
Send the characters in @var{string} to the terminal to output
this glyph code.
-@item @var{integer}
-Define this glyph code as an alias for glyph code @var{integer}. You
-can use such an alias to define a small-numbered glyph code which
-specifies a face.
+@item @var{code}
+Define this glyph code as an alias for glyph code @var{code} created
+by @code{make-glyph-code}. You can use such an alias to define a
+small-numbered glyph code which specifies a character with a face.
@item @code{nil}
This glyph code is simple.