It looks like Font::TTF::Name is what you want.
In reply to Re: How to extract the font name from a .ttf file? by belg4mit in thread How to extract the font name from a .ttf file? by punkass