Package: cairo

Function cairo:font-face

Lambda List

cairo:font-face (cr)

Syntax

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

Arguments

cr -- a cairo:context-t instance
face -- a cairo:font-face-t instance, or nil to restore to the default font

Details

The cairo:font-face function gets the current font face for a Cairo context. The (setf cairo:font-face) function replaces the current font face. The replaced font face in the Cairo context will be destroyed if there are no other references to it.

This object is owned by Cairo. To keep a reference to it, you must call the cairo:font-face-reference function. This function always returns a cairo:font-face-t instance. If memory cannot be allocated, a special "nil" instance will be returned on which the cairo:font-face-status function returns the :no-memory value. Using this "nil" instance will cause its error state to propagate to other objects it is passed to, for example, calling the cairo:font-face function with a "nil" font will trigger an error that will shutdown the Cairo context.
 

See also

2025-1-29