Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
W
word_cloud_est
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
keeleliin
word_cloud_est
Commits
18c4a651
Commit
18c4a651
authored
Jun 19, 2015
by
Andreas Mueller
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Include a droid sans mono ttf file
parent
c990bc9e
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
6 additions
and
6 deletions
+6
-6
README.md
README.md
+4
-0
setup.py
setup.py
+1
-1
wordcloud/DroidSansMono.ttf
wordcloud/DroidSansMono.ttf
+0
-0
wordcloud/wordcloud.py
wordcloud/wordcloud.py
+1
-5
No files found.
README.md
View file @
18c4a651
...
...
@@ -93,3 +93,7 @@ not iterable` problem][intprob] also showcased on the blog.
[
imgur-wordnuvola
]:
http://defacto133.imgur.com/all/
[
intprob
]:
http://peekaboo-vision.blogspot.de/2012/11/a-wordcloud-in-python.html#bc_0_28B
## Licensing
The wordcloud library is MIT licenced, but contains DroidSansMono.ttf, a true type font by Google, that is apache licensed.
The font is by no means integral, and any other font can be used by setting the
``font_path``
variable when creating a
``WordCloud``
object.
setup.py
View file @
18c4a651
...
...
@@ -10,5 +10,5 @@ setup(
ext_modules
=
[
Extension
(
"wordcloud/query_integral_image"
,
[
"wordcloud/query_integral_image.c"
])],
packages
=
[
'wordcloud'
],
package_data
=
{
'wordcloud'
:
[
'stopwords'
]}
package_data
=
{
'wordcloud'
:
[
'stopwords'
,
'DroidSansMono.ttf'
]}
)
wordcloud/DroidSansMono.ttf
0 → 100644
View file @
18c4a651
File added
wordcloud/wordcloud.py
View file @
18c4a651
...
...
@@ -12,7 +12,6 @@ import re
import
sys
import
numpy
as
np
from
operator
import
itemgetter
from
platform
import
system
from
PIL
import
Image
from
PIL
import
ImageDraw
...
...
@@ -22,10 +21,7 @@ from .query_integral_image import query_integral_image
item1
=
itemgetter
(
1
)
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"
)
FONT_PATH
=
os
.
environ
.
get
(
"FONT_PATH"
,
os
.
path
.
join
(
os
.
path
.
dirname
(
__file__
),
"DroidSansMono.ttf"
))
STOPWORDS
=
set
([
x
.
strip
()
for
x
in
open
(
os
.
path
.
join
(
os
.
path
.
dirname
(
__file__
),
'stopwords'
)).
read
().
split
(
'
\n
'
)])
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment