If I have a Tex font, and I want to really understand how it will be laid out by Tex, and what features of the font to bear in mind when tuning my output to be beautiful, what tools are useful for this?

  1. I've heard that the usual measure of font size, points per em, is tricky. Is there a good overview of how these measurements are used in font design? One that relates this information to Metafont and True/Open Type fonts?
  2. I'd like to see where baselines and the em square are on the glyphs of a font. Are there tools to do that?
  3. Where can I get summary information about fonts? How do I understand the content of .tfm files? Are there tools that generate these summaries?
  4. Is there relevant information in fontspec?

I've asked this question as a generalisation of How to determine the true size of a font, because the narrow discussion there didn't really settle all the issues.

  • 1
    Odd combination of tags. I would never expect to see fontspec and metafont in the same place. Anyway: In the case of Open Type fonts (and many TTF), try opening the fonts in a font editor, such as FontForge. Then, you can see how the actual glyph shapes relate to the font metrics, and even inspect kerning tables. Not for the timid. Note that if you are using Open Type fonts with fontspec then you don't need to care about TeX font metric files. – user103221 Jan 2 '17 at 23:25

Here is an attempt at answering item 2, assuming you are using a traditional TeX or pdfTeX format with TFM-based fonts (not XeLaTeX or LuaLaTeX):

For plain TeX, there is testfont.tex. For LaTeX, the fonttable package does something similar. For context, there is the \showfont command.

PS: I have no idea how to answer anything else; 1 and 3 are much too general for an answer that is shorter than a medium-sized book, and I know nothing of 4.

  • A reference to a medium-sized book, or several, saying what you will find in the book, is fine. The question is on behalf of people who really want to get to grips with what is going on. I have answers to some of the parts, but not all. – Charles Stewart Aug 11 '10 at 8:40
  • Maybe this is a useful place to start: en.wikipedia.org/wiki/Category:Font_formats – Taco Hoekwater Aug 11 '10 at 9:03

The font metric (tfm) file contains only metric information about the font. It does not contain information such as the shape of the glyphs. It contains only the information TeX needs to know where to place characters in the font (glyphs) on the page.

Here's a program that makes TFM files less inscrutable.

$ tftopl --help
Usage: tftopl [OPTION]... TFMNAME[.tfm] [PLFILE[.pl]]
  Translate the font metrics TFMNAME to human-readable property list file
  PLFILE or standard output.

I think that most of your questions involve information that is not in the TFM file.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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