Package: cairo

Macro cairo:with-scaled-font

Lambda List

cairo:with-scaled-font ((font face matrix ctm options) &body body)

Syntax

(cairo:with-scaled-font (font face matrix ctm options) body) => result

Arguments

font -- a newly allocated cairo:scaled-font-t instance
matrix -- a cairo:matrix-t matrix for the font space to user space transformation for the font, in the simplest case of a N point font, this matrix is just a scale by N, but it can also be used to shear the font or stretch it unequally along the two axes, see the cairo:font-matrix function
ctm -- a cairo:matrix-t matrix for the user to device transformation with which the font will be used
options -- a cairo:font-options-t value for the options to use when getting metrics for the font and rendering with it

Details

The cairo:with-scaled-font macro allocates a new cairo:scaled-font-t instance for the given arguments and executes the body that uses the Cairo context. After execution of the body the allocated memory for the Cairo scaled font is released.

This macro allocates the Cairo scaled font with the cairo:scaled-font-create function and destroys it with the cairo:scaled-font-destroy function.
 

See also

2025-1-29