3 import gd
, os
, cStringIO
, urllib2
, sys
6 '/usr/lib/python/site-packages/reportlab/fonts/PenguinAttack.ttf'
7 '/usr/share/fonts/truetype/freefont/FreeSans.ttf',
8 '/usr/share/fonts/truetype/ttf-bitstream-vera/Vera.ttf',
14 fontpath
= fontpath
+ ':' + os
.path
.dirname(f
)
15 FONT
= os
.path
.basename(f
)
18 os
.environ
["GDFONTPATH"] = fontpath
23 print "no fonts found"
27 im
= gd
.image((20,200))
29 white
= im
.colorAllocate((255, 255, 255))
30 black
= im
.colorAllocate((0, 0, 0))
32 #im.colorTransparent(white)
35 im
.string_ttf(FONT
, 10.0, 1.56, (15, 190), sys
.argv
[1], black
)
37 f
=open(sys
.argv
[1]+".png","w")