Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

Given a directory of font files (TTF and OTF) I'd like to inspect each font and determine what style (regular, italic, bold, bold-italic) it is. Is there a command line tool for unix flavored operating systems that can do this? Or does anyone know how to extract the metadata from a TTF or OTF font file?


share|improve this question
add comment

1 Answer

up vote 1 down vote accepted

I think you're looking for otfinfo. There doesn't seem to be an option to get at the Subfamily directly, but you could do:

otfinfo --info *.ttf | grep Subfamily

Note that a number of the fonts I looked at use "Oblique" instead of "Italic".

share|improve this answer
Perfect, thanks! For those interested I'm on OS X and installed it via brew with brew install lcdf-typetools –  kreek Dec 5 '11 at 5:28
add comment

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.