11.2 Text Style Binding Forms

with-text-style  (medium text-style) &body body [Macro]
          

Binds the current text style of the medium designated by medium to correspond to the new text style. text-style may either a text style object or a style spec (that is, a list of the a family, a face code, and a size). body is executed with the new text style in effect. [annotate]

The medium argument is not evaluated, and must be a symbol that is bound to a sheet or medium. If medium is t, *standard-output* is used. body may have zero or more declarations as its first forms. [annotate]

with-text-style must be implemented by expanding into a call to invoke-with-text-style, supplying a function that executes body as the continuation argument to invoke-with-text-style. [annotate]

[annotate]

invoke-with-text-style  medium continuation text-style [Generic Function]
          

Binds the current text style of the medium medium to correspond to the new text style, and calls the function continuation with the new text style in effect. text-style may either a text style object or a style spec (that is, a list of the a family, a face code, and a size). continuation is a function of one argument, the medium; it has dynamic extent. [annotate]

medium can be a medium, a sheet that supports the sheet output protocol, or a stream that outputs to such a sheet. All classes that obey the medium protocol must implement a method for invoke-with-text-style. [annotate]

[annotate]

with-text-family  (medium family) &body body [Macro]
with-text-face  (medium face) &body body [Macro]
with-text-size  (medium size) &body body [Macro]
          

Binds the current text style of the medium designated by medium to correspond to a new text style consisting of the current text style with the new family, face, or size (respectively) merged in. face, family, and size are as for make-text-style. body is executed with the new text style in effect. [annotate]

The medium argument is not evaluated, and must be a symbol that is bound to a sheet or medium. If medium is t, *standard-output* is used. body may have zero or more declarations as its first forms. [annotate]

These macros are "convenience" forms of with-text-style that must expand into calls to invoke-with-text-style. [annotate]

[annotate]