Context.getScaledFont

Gets the current scaled font for a #cairo_t.

Returns

the current scaled font. This object is owned by

cairo. To keep a reference to it, you must call [cairo.scaled_font.ScaledFont.reference].

This function never returns null. If memory cannot be allocated, a special "nil" #cairo_scaled_font_t object will be returned on which [cairo.scaled_font.ScaledFont.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.setScaledFont] with a nil font will trigger an error that will shutdown the #cairo_t object).