Package: cairo

Function cairo:font-matrix

Lambda List

cairo:font-matrix (cr matrix)

Syntax

(cairo:font-matrix cr matrix) => matrix
(setf (cairo:font-matrix cr) matrix)

Arguments

cr -- a cairo:context-t instance
matrix -- a cairo:matrix-t instance for the values of the matrix

Details

The cairo:font-matrix function stores the current font matrix into matrix and returns the cairo:matrix-t instance. The (setf cairo:font-matrix) function sets the current font matrix.

The font matrix gives a transformation from the design space of the font (in this space, the em-square is 1 unit by 1 unit) to user space. Normally, a simple scale is used, see the cairo:set-font-size function, but a more complex font matrix can be used to shear the font or stretch it unequally along the two axes.
 

See also

2025-1-29