Re: Font management under win32

2005-09-30 Thread Fredrik Lundh
Stefano Masini wrote: > Do you think that is possible with win32 extensions? you can do this via PIL's ImageFont module: >>> import ImageFont >>> f = ImageFont.truetype("arial.ttf") >>> f.font.family 'Arial' >>> f.font.style 'Regular' or, if you don't want to ship the entire PIL library with yo

Re: Font management under win32

2005-09-30 Thread Stefano Masini
On 9/30/05, Roger Upole <[EMAIL PROTECTED]> wrote: > Here's an example of how to use EnumFontFamilies: I'm trying the code you just posted, which works (thanks a lot), but I'm having another problem now. As I stated in my first post, the reason why I need to know the list of installed fonts is th

Re: Font management under win32

2005-09-29 Thread Roger Upole
Here's an example of how to use EnumFontFamilies: import win32gui hdc=win32gui.CreateDC('DISPLAY','Display',None) fonts=[] def callback(font, tm, fonttype, fonts): fonts.append(font) print font.lfFaceName return True win32gui.EnumFontFamilies(hdc, None, callback, fonts) The parameters

Re: Font management under win32

2005-09-28 Thread Neil Hodgson
Stefano Masini: > Indeed, win32gui does contain an EnumFontFamilies (without the > trailing "Ex") function, but I found no usage example, and I couldn't > figure out how to use LOGFONT handles (since such a thing is required > as the first parameter to the call). So I decided to punt on it and > a

Font management under win32

2005-09-28 Thread Stefano Masini
Hi, I have a simple need, running under windows: 1) retrieve the list of installed system fonts 2) maybe install missing fonts Surprisingly for me, there seems to be no support for such a thing in python. I really hope I'm mistaken, so _please_ correct me if I'm wrong. I found out that it all b