mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-08-09 14:54:46 +03:00
Merge f3963aabd2
into 094a2ca592
This commit is contained in:
commit
af30f8ae35
|
@ -261,7 +261,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