Skip to content

Commit

Permalink
Merge pull request amueller#63 from sedders123/master
Browse files Browse the repository at this point in the history
If Windows use a different FONT_PATH
  • Loading branch information
amueller committed Apr 30, 2015
2 parents 642b4b5 + a06678d commit 5a5d435
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion wordcloud/wordcloud.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
import sys
import numpy as np
from operator import itemgetter
from platform import system

from PIL import Image
from PIL import ImageDraw
Expand All @@ -20,7 +21,10 @@

item1 = itemgetter(1)

FONT_PATH = os.environ.get("FONT_PATH", "/usr/share/fonts/truetype/droid/DroidSansMono.ttf")
if system() == "Windows":
FONT_PATH = r"C:\Windows\Fonts\consola.ttf"
else:
FONT_PATH = os.environ.get("FONT_PATH", "/usr/share/fonts/truetype/droid/DroidSansMono.ttf")
STOPWORDS = set([x.strip() for x in open(os.path.join(os.path.dirname(__file__),
'stopwords')).read().split('\n')])

Expand Down

0 comments on commit 5a5d435

Please sign in to comment.