11.3 Controlling Text Style Mappings

Text styles are mapped to fonts using the text-style-mapping function, which takes a port, a character set, and a text style and returns a font object. All ports must implement methods for the following generic functions, for all classes of text style. [annotate]

The objects used to represent a font mapping are unspecified and are likely to vary from port to port. For instance, a mapping might be some sort of font object on one type of port, or might simply be the name of a font on another. [annotate]

Minor issue: We still need to describe what a device font is. Ditto, character sets. --- SWM [annotate]

Part of initializing a port is to define the mappings between text styles and font names for the port's host window system. [annotate]

text-style-mapping  port text-style &optional character-set [Generic Function]

Returns the font mapping that will be used when rendering characters in the character set character-set in the text style text-style on any medium on the port port. If there is no mapping associated with character-set and text-style on port, then some other object will be returned that corresponds to the "unmapped" text style. [annotate]

character-set defaults to the standard character set. [annotate]


(setf text-style-mapping)  mapping port text-style &optional character-set [Generic Function]

Sets the text style mapping for port, character-set, and text-style to mapping. port, character-set, and text-style are as for text-style-mapping. mapping is either a font name or a list of the form (:style family face size); in the latter case, the given style is translated at runtime into the font represented by the specified style. [annotate]

character-set defaults to the standard character set. [annotate]


make-device-font-text-style  display-device device-font-name [Function]

Returns a text style object that will be mapped directly to the specified device font when text is output to a to the display device with this style. Device font styles do not merge with any other kind of style. [annotate]


Note: What is a display device? [edit]-- Gilbert Baumann 2020-10-20 19:13Z