[PyKDE] QFont and PIL

Aljosa Mohorovic aljosa at revolucija.hr
Wed Jul 19 17:24:52 BST 2006


i use QFontDialog to get QFont data so i can use some font (available
from system) later to write text on image using PIL but i can't find
method which returns system filename for selected font.

i'm using Qt4 v.4.1.4 / PyQt v.4.0.1 / PIL 1.1.5 / Python 2.4.2

code:
>>>
font = ImageFont.truetype(str(self.font_filename)+".ttf", self.font_size)
draw = ImageDraw.Draw(img)
draw.text((10, 10), self.text, font=font,fill=self.color.getRgb())
<<<

i'm looking for something like QFont.getFilename() or a way to use
selected QFont from PIL.

Aljosa Mohorovic




More information about the PyQt mailing list