[ < ] [ > ]   [ << ] [Plus haut] [ >> ]         [Top] [Table des matières] [Index] [ ? ]

38.21.3 Glyphs

A glyph is a generalization of a character; it stands for an image that takes up a single character position on the screen. Normally glyphs come from vectors in the display table (voir la section Display Tables).

A glyph is represented in Lisp as a glyph code. A glyph code can be simple or it can be defined by the glyph table. A simple glyph code is just a way of specifying a character and a face to output it in. Voir la section Faces.

The following functions are used to manipulate simple glyph codes:

Function: make-glyph-code char &optional face

This function returns a simple glyph code representing char char with face face.

Function: glyph-char glyph

This function returns the character of simple glyph code glyph.

Function: glyph-face glyph

This function returns face of simple glyph code glyph, or nil if glyph has the default face (face-id 0).

On character terminals, you can set up a glyph table to define the meaning of glyph codes (represented as small integers).

Variable: glyph-table

The value of this variable is the current glyph table. It should be nil or a vector whose gth element defines glyph code g.

If a glyph code is greater than or equal to the length of the glyph table, that code is automatically simple. If glyph-table is nil then all glyph codes are simple.

The glyph table is used only on character terminals. On graphical displays, all glyph codes are simple.

Here are the meaningful types of elements in the glyph table:

string

Send the characters in string to the terminal to output this glyph code.

code

Define this glyph code as an alias for glyph code code created by make-glyph-code. You can use such an alias to define a small-numbered glyph code which specifies a character with a face.

nil

This glyph code is simple.

Function: create-glyph string

This function returns a newly-allocated glyph code which is set up to display by sending string to the terminal.


[ < ] [ > ]   [ << ] [Plus haut] [ >> ]         [Top] [Table des matières] [Index] [ ? ]

Ce document a été généré par Eric Reinbold le 13 Octobre 2007 en utilisant texi2html 1.78.