FontFace.setUserData

Attach user data to font_face. To remove user data from a font face, call this function with the key that was used to set it and NULL for data. Since 1.0

class FontFace
setUserData
(,
void* userData
,
cairo_destroy_func_t destroy
)

Parameters

key cairo_user_data_key_t*

the address of a cairo_user_data_key_t to attach the user data to

userData void*

the user data to attach to the font face

destroy cairo_destroy_func_t

a cairo_destroy_func_t which will be called when the font face is destroyed or when new user data is attached using the same key.

Return Value

CAIRO_STATUS_SUCCESS or CAIRO_STATUS_NO_MEMORY if a slot could not be allocated for the user data.