Skip to content

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

@gpjt

Description

@gpjt

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions