|
|
@@ -6,8 +6,8 @@ import re, sys, os
|
|
|
from PIL import Image, ImageDraw, ImageFont
|
|
|
|
|
|
# Font search paths and acceptable names. Order matters.
|
|
|
-FONT_DIRS = "/usr/share/fonts/truetype/freefont", "/usr/lib/fonts/", "/Library/Fonts"
|
|
|
-FONT_NAMES = "FreeMono.ttf", "Andale Mono.ttf", "Arial Black.ttf", "Hei.ttf.ttf", "Courier New.ttf"
|
|
|
+FONT_DIRS = "/usr/share/fonts/truetype/freefont","/usr/share/fonts/truetype", "/usr/lib/fonts/", "/Library/Fonts"
|
|
|
+FONT_NAMES = "FreeMono.ttf", "Andale Mono.ttf", "Arial Black.ttf", "Hei.ttf.ttf", "Courier New.ttf", "DejaVuSans.ttf"
|
|
|
|
|
|
def findfont(names=FONT_NAMES, dirs=FONT_DIRS):
|
|
|
"""Return first existing path or None."""
|