Mercurial > ift6266
diff scripts/fonts_test.py @ 135:36010ff90255
Added script to test truetype font files validity (corruption)
author | boulanni <nicolas_boulanger@hotmail.com> |
---|---|
date | Sat, 20 Feb 2010 02:10:30 -0500 |
parents | |
children | bb26c12bb9f6 |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/scripts/fonts_test.py Sat Feb 20 02:10:30 2010 -0500 @@ -0,0 +1,15 @@ + +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