Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

When using a dummy display (eg. headless environment) all of the tags are on top of each other #22

Open
gpjt opened this issue Oct 10, 2014 · 1 comment

Comments

@gpjt
Copy link

gpjt commented Oct 10, 2014

Possibly I'm just missing some config, do let me know if so! Here's what I did:

$ export SDL_VIDEODRIVER="dummy"
$ python
Python 2.7.6 (default, Mar 22 2014, 22:59:56) 
[GCC 4.8.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import pygame
>>> pygame.display.set_mode((1024,768)) 
<Surface(1024x768x8 SW)>
>>> from pytagcloud import create_tag_image, make_tags
>>> from pytagcloud.lang.counter import get_tag_counts
>>> 
>>> YOUR_TEXT = "A tag cloud is a visual representation for text data, typically\
... used to depict keyword metadata on websites, or to visualize free form text."
>>> 
>>> tags = make_tags(get_tag_counts(YOUR_TEXT), maxsize=120)
>>> 
>>> create_tag_image(tags, 'cloud_large.png', size=(900, 600), fontname='Lobster') 

The result looks like this:
image

@singular1ty94
Copy link

Having the same issue myself. Works flawlessly on my local machine, but on my remote server all the words pile up on eachother. I've tried editing the __init__.py file to use a headless version of PyGame (by setting os.environ['SDL_VIDEODRIVER'] to 'dummy', but it still hasn't fixed the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants