Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Well you can use <a href="http://php.net/manual/en/function.imagettfbbox.php" rel="nofollow noreferrer">imagettfbox</a> (see also <a href="http://ruquay.com/sandbox/imagettf/" rel="nofollow noreferrer">http://ruquay.com/sandbox/imagettf/</a>) to get the canvas boundaries of the tag text you created - given a font, rotation and size (which obviously depends on the number of occurrences of any given tag).</p> <p>From that point you can start placing the tag words (randomly? - see <strong>edit</strong>) in the cloud canvas, until all of them are placed. You just have to make sure they don't overlap (ie you can store the pixel coordinates in a array).</p> <p>One other thing that you need to make sure is to make the image canvas big enough (or the font size small enough) to accommodate all the tags, so you'll need to precalculate (again, using imagettfbox) the exact pixel size of each word and after you've reached a size where all the words can fit inside the image canvas you can start placing them using <a href="http://www.php.net/manual/en/function.imagettftext.php" rel="nofollow noreferrer">imagettftext</a>.</p> <p><strong>EDIT</strong>: You can also learn a lot (and maybe <a href="http://www.wordle.net/contact" rel="nofollow noreferrer">contact the developer</a>) by taking a look at the <a href="http://www.wordle.net/credits" rel="nofollow noreferrer">credits</a>, for example:</p> <blockquote> <p>Thank you, Martin Wattenberg, for the central idea of just throwing stuff at the screen until it fits. I raise my glass to the philosophy of "the dumbest possible thing that works."</p> </blockquote> <p>And much more...</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload