atizo / PyTagCloud

Create beautiful tag clouds as images or HTML
https://labs.atizo.com/software/#pytagcloud
BSD 3-Clause "New" or "Revised" License
397 stars 128 forks source link

Words still cut out of the picture #14

Closed kernc closed 10 years ago

kernc commented 11 years ago

Kudos,

Using PyTagCloud to amend my CV with relevant keywords, I found words still get offset out of the image.

While @konstantint's issue #12 helps considerably, I experienced truncation until I replaced https://github.com/atizo/PyTagCloud/blob/master/pytagcloud/__init__.py#L355 image_surface = Surface((sizeRect.w, sizeRect.h), SRCALPHA, 32) with image_surface = Surface((sizeRect.w + 2*TAG_CLOUD_PADDING, sizeRect.h + 2*TAG_CLOUD_PADDING), SRCALPHA, 32) Not sure if this is a fix, though, but it helped in my case.

konstantint commented 11 years ago

Looks like a valid fix to a valid bug (that I seem to have introduced) indeed. You should probably suggest the edit as a proper pull request.

aeby commented 11 years ago

Thanks for the hint and fix. @kernc Can you create a pull request with this fix please?

kernc commented 11 years ago

Submitted. Thank you both.