Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Are there some default fonts (ttf) in python Pillow?

In the documentation of Pillow (PIL Fork). One font type is mentioned in ImageDraw module tutorial that is "FreeMono", for example fnt = ImageFont.truetype("Pillow/Tests/fonts/FreeMono.ttf", 40).

It seems possible to get other fonts' ttf locally on the machine and use it with Pillow, but I was wondering are there any other testing fonts (other than "FreeMono") for testing and playing around with this tool, like some bolder fonts, etc?

like image 478
GeekyShacklebolt Avatar asked Feb 18 '26 20:02

GeekyShacklebolt


1 Answers

Sure:

Pillow/Tests/fonts/ArefRuqaa-Regular.ttf
Pillow/Tests/fonts/DejaVuSans.ttf
Pillow/Tests/fonts/AdobeVFPrototype.ttf
Pillow/Tests/fonts/KhmerOSBattambang-Regular.ttf
Pillow/Tests/fonts/NotoSansSymbols-Regular.ttf
Pillow/Tests/fonts/FreeMono.ttf
Pillow/Tests/fonts/NotoNastaliqUrdu-Regular.ttf
Pillow/Tests/fonts/DejaVuSans-bitmap.ttf
Pillow/Tests/fonts/TINY5x3GX.ttf

Search in the repository with:

find . -name "*.ttf"
like image 88
Mark Setchell Avatar answered Feb 21 '26 14:02

Mark Setchell