Extracting hte font name from a TrueType font file
Steve Holden
steve at holdenweb.com
Thu Sep 18 20:48:42 EDT 2008
Fredrik Lundh wrote:
> Steve Holden wrote:
>
>> Does anyone have a Python recipe for this?
>
>>>> from PIL import ImageFont
>>>> f = ImageFont.truetype("/windows/fonts/verdanai.ttf", 1)
>>>> f.font.family
> 'Verdana'
>>>> f.font.style
> 'Italic'
>
Thanks so much, Fredrik. The reason I asked is because I found the
specification completely opaque ...
regards
Steve
--
Steve Holden +1 571 484 6266 +1 800 494 3119
Holden Web LLC http://www.holdenweb.com/
More information about the Python-list
mailing list