mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-08-08 06:14:45 +03:00
Allow .otf files in truetype()
This commit is contained in:
parent
0bc24cb213
commit
f3963aabd2
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue
Block a user