On Tue, Oct 12, 2010 at 1:31 PM, Dévji Chhãngã <dev....@gmail.com> wrote: > Hello Image-SIG, > I am a newbie to PIL, I have following code > > def __setFont (self, filename): > pilfont = ImageFont.load(filename) > return pilfont > > def drawImage (self): > cg = CaptchaString(4) > myString = cg.getString() #Some other object to get string from > myFont = self.__setFont('E:\\pilfonts\\timB12.pil') > > img = Image.new('RGB', (220,90), '#FFFFFF') > > drawText = ImageDraw.Draw(img) > drawText.text((6, 0), myCaptchaString, font=myFont, fill=(255, 100, > 25)) > > img.save('myFile.png', 'PNG') > > I don't know how to set font size so that it appear larger
The "pil" fonts are simple raster fonts that have a fixed size. To get more flexible font scaling, you want to use TrueType fonts instead. </F> _______________________________________________ Image-SIG maillist - Image-SIG@python.org http://mail.python.org/mailman/listinfo/image-sig