Context.getFontFace

Gets the current font face for a #cairo_t.

Returns

the current font face. This object is owned by

cairo. To keep a reference to it, you must call [cairo.font_face.FontFace.reference].

This function never returns null. If memory cannot be allocated, a special "nil" #cairo_font_face_t object will be returned on which [cairo.font_face.FontFace.status] returns [cairo.types.Status.NoMemory]. Using this nil object will cause its error state to propagate to other objects it is passed to, (for example, calling [cairo.context.Context.setFontFace] with a nil font will trigger an error that will shutdown the #cairo_t object).