Search code examples
python-imaging-librarytruetype

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?


Solution

  • 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"