Well, you can use imagettfbox (see also http://ruquay.com/sandbox/imagettf/ ) to get the borders of the canvas in the text of the tag that you created - taking into account the font, rotation and size (which obviously depends from the number of occurrences of any given tag).
From this point, you can start placing tags (randomly? - see edit ) in a cloud canvas until all of them are placed. You just need to make sure that they do not overlap (i.e. you can store the pixel coordinates in an array).
, , - ( ), , ( , imagettfbox) , , , imagettftext.
EDIT. (, , ), credits, :
, , , . " , ."
...