Mercurial > ift6266
view scripts/fonts_test.py @ 158:d1bb6e06497a
nouveau répertoire régression logistique
author | Myriam Cote <cotemyri@iro.umontreal.ca> |
---|---|
date | Thu, 25 Feb 2010 09:04:40 -0500 |
parents | 36010ff90255 |
children | bb26c12bb9f6 |
line wrap: on
line source
import random, os import ImageFont, ImageDraw, Image dir1 = "/data/lisa/data/ift6266h10/allfonts/" img = Image.new("L", (100,100)) draw = ImageDraw.Draw(img) for f in os.listdir(dir1): try: font = ImageFont.truetype(dir1+f, 25) textSize = font.getsize("kD9") except: print dir1+f