mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-08-09 06:44:45 +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:
|
try:
|
||||||
return FreeTypeFont(font, size, index, encoding)
|
return FreeTypeFont(font, size, index, encoding)
|
||||||
except IOError:
|
except IOError:
|
||||||
if font.endswith(".ttf"):
|
if font.endswith(".ttf") or font.endswith(".otf"):
|
||||||
ttf_filename = font
|
ttf_filename = font
|
||||||
else:
|
else:
|
||||||
ttf_filename = "%s.ttf" % font
|
ttf_filename = "%s.ttf" % font
|
||||||
|
|
Loading…
Reference in New Issue
Block a user