Suggest a methodology for measuring the character widths of existing fonts

blank's picture

How do people usually measure character width for the purpose of comparing characters? Are measurements made of just the characters themselves, or does the measurement measure the sidebearings? Does one just measure the numbers of characters-per-pica and compare that? Or is this just one of those things that a researcher does however he or she feels is appropriate?

And has anyone ever seen a script that can just flow through a font and calculate the average width of alphanumeric characters?

satya's picture

Don't know about the other ways but generally you can find these metrics
data in a .PFM (PostScript Font Metrics) file which you can open with any text editor.

kentlew's picture

For Mac PS Type 1 fonts, the same data is in the AFM file (also a text file).

After some header information, the metrics information begins with "StartCharMetrics." The information for each character takes this format:

C 65 ; WX 642 ; N A ; B 2 0 640 651 ;

First is the character ID number (C), then the width (WX), then the character name (N), then the coordinates for the bounding box (B). The bounding box measures the four extreme points of the glyph -- left, bottom, right, top.

In this example, character number 65 has an advance width of 642 and is the letter A. The left sidebearing is 2; it sits on the baseline, 0; the actual width of the glyph is 638 units (rightmost point, 640, minus the leftmost, 2); the height is 651 units. By subtracting the rightmost coordinate from the advance width, you get the right sidebearing of 2.

Whether these measurements are a useful standard for comparison or not is a different question.

-- Kent.

Don McCahill's picture

> Whether these measurements are a useful standard for comparison or not is a different question.

The standard for comparison is the characters per pica that were once supplied by each type manufacturer with the font, but no longer seem to be. (Of course since fonts are no longer sold in a one size basis, the pica might not be the ideal measurement anymore. But even if the cpp of 10 or 12 point was given, it would provide comparison.)

But I don't know how they calculated the cpp. Was it based on the whole alphabet, or some standard of commonly used letters?

Syndicate content Syndicate content