Allow .otf files in truetype()

This commit is contained in:
Robin Lewis 2015-02-23 11:51:51 +00:00
parent 0bc24cb213
commit f3963aabd2

View File

@ -239,7 +239,7 @@ def truetype(font=None, size=10, index=0, encoding="", filename=None):
try:
return FreeTypeFont(font, size, index, encoding)
except IOError:
if font.endswith(".ttf"):
if font.endswith(".ttf") or font.endswith(".otf"):
ttf_filename = font
else:
ttf_filename = "%s.ttf" % font