There is a simple solution that you can use. You will need Perl and libfont-ttf-perl package :

#! /usr/bin/perl use Font::TTF::Font; unless (defined $ARGV[0]) { die <<'EOT'; ttfnumglyphs infontfile ... Prints glyph count for each input TTF file EOT } foreach (@ARGV) { $f = Font::TTF::Font->open($_) || die "Unable to open font file $_"; $num = $f->{'maxp'}{'numGlyphs'}; printf "%6d %s

", $num, $_; $f->release; }

The only thing you need to do is to save this script to a file, call it throught Perl and give it as a parameter the path of the font you want to count the glyphs :

$ perl glyphs_counter.pl /path/to/the/foo_font.ttf

It seems to work for TTF and OTF formats. Hope it helps.