textClusterAllocate

fncairo.text_cluster.TextCluster textClusterAllocate(int numClusters)

Allocates an array of #cairo_text_cluster_t's. This function is only useful in implementations of #cairo_user_scaled_font_text_to_glyphs_func_t where the user needs to allocate an array of text clusters that cairo will free. For all other uses, user can use their own allocation method for text clusters.

This function returns null if num_clusters is not positive, or if out of memory. That means, the null return value signals out-of-memory only if num_clusters was positive.

Parameters

numClustersnumber of text_clusters to allocate

Returns

the newly allocated array of text clusters that should be

freed using [cairo.text_cluster.TextCluster.free]