We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 98b2cd7 commit 2b88813Copy full SHA for 2b88813
scripts/braindance.py
@@ -27,7 +27,10 @@ def to_surface(x, text=None):
27
if text is not None:
28
from PIL import ImageDraw, ImageFont
29
fontsize=22
30
- font = ImageFont.truetype("/usr/share/fonts/liberation/LiberationSans-BoldItalic.ttf", fontsize)
+ try:
31
+ font = ImageFont.truetype("/usr/share/fonts/liberation/LiberationSans-BoldItalic.ttf", fontsize)
32
+ except OSError:
33
+ font = ImageFont.load_default()
34
margin = 8
35
36
x = x.transpose(1,0,2)
0 commit comments