Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I have some truetype fonts which support UTF-8 characters. I can use "fc-list" to find certain font. How can I check all available characters in some font? Such as how many characters supported in "AR PL New Sung ExtB".

share|improve this question
1  
In the newer fontconfig, there is a fc-query program which can list the Unicode ranges that the font covers. –  Dan D. May 29 '12 at 11:53

1 Answer 1

You could use a different commandline tool, ttfdump, assuming you're looking at a TTF font file. It should also work for OTF fonts, if they belong to the TTF variety:

ttfdump /path/to/your/file.ttf  \
   | grep -E '(Number of Glyphs:|numGlyphs:|numberOfHMetrics:)'

This should get you the number of glyphs. You'll possibly see up to four different numbers, if the TTF is in some way b0rken. Sane TTF will return identical numbers for all three entries, in which case you may be pretty confident that you got the correct number:

ttfdump /Library/Fonts/WeidemannStd-Book.otf  \
  | grep -E '(Number of Glyphs:|numGlyphs:|numberOfHMetrics:)'

    numberOfHMetrics:      253
    numGlyphs:             253

Another example:

ttfdump /Library/Fonts/DroidSerif-Regular.ttf \
   | grep -E '(Number of Glyphs:|numGlyphs:|numberOfHMetrics:)'

     numberOfHMetrics:     609
     numGlyphs:            609
     numGlyphs:            609
     Number of Glyphs:     609
share|improve this answer

Your Answer

 
discard

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.