Common Lisp the Language, 2nd Edition

Next: String Characters Up: Characters Previous: Non-standard Characters

## 2.2.4. Character Attributes

Every object of type `character` has three attributes: code, bits, and font. The code attribute is intended to distinguish among the printed glyphs and formatting functions for characters; it is a numerical encoding of the character proper. The bits attribute allows extra flags to be associated with a character. The font attribute permits a specification of the style of the glyphs (such as italics). Each of these attributes may be understood to be a non-negative integer.

The font attribute may be notated in unsigned decimal notation between the `#` and the `\`. For example, `#3\a` means the letter `a` in font 3. This might mean the same thing as `#\` if font 3 were used to represent Greek letters. Note that not all Common Lisp implementations provide for non-zero font attributes; see `char-font-limit`.

The bits attribute may be notated by preceding the name of the character by the names or initials of the bits, separated by hyphens. The character itself may be written instead of the name, preceded if necessary by `\`. For example:

    #\Control-Meta-Return   #\Meta-Control-Q
    #\Hyper-Space           #\Meta-\a
    #\Control-A             #\Meta-Hyper-\:
    #\C-M-Return            #\Hyper-\

Note that not all Common Lisp implementations provide for non-zero bits attributes; see `char-bits-limit`.

X3J13 voted in March 1989 (CHARACTER-PROPOSAL) to replace the notion of bits and font attributes with that of implementation-defined attributes.

Next: String Characters Up: Characters Previous: Non-standard Characters