问题
There's this library, persian-word-cloud, which is a fork of word_cloud.
In the example directory of this library, there's this example, with_mask.py, which uses twitter-logo.jpg to create a word cloud from persian.txt.
The output should look like this:
But when I install the package using pip install persian_wordcloud
and run the same script, the output looks like this:
As you can see, the direction of the words are wrong. How can I fix this?
Also, the problem seems to be with version 3.8.1
of Python, because if I run it with version 3.7.4
everything works well.
来源:https://stackoverflow.com/questions/60286526/right-to-left-alignment-not-working-in-python-word-cloud