Re: Extracting hte font name from a TrueType font file

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Fredrik Lundh

    Re: Extracting hte font name from a TrueType font file

    Steve Holden wrote:
    Does anyone have a Python recipe for this?
    >>from PIL import ImageFont
    >>f = ImageFont.truet ype("/windows/fonts/verdanai.ttf", 1)
    >>f.font.fami ly
    'Verdana'
    >>f.font.styl e
    'Italic'

    </F>

Working...