for information about the OpenType specification (a superset of TrueType) and you'll begin to see that extracting character metrics from a TrueType font is not a trivial task.
The same is true of PCL fonts, which come in a number of variants, within 3 'groups':
(a) PCL bitmap fonts.
(b) PCL Encapsulated Intellifont Outline (PCLEO) fonts.
Downloadable files usually have .sfs or .sfd extensions.
Not used much these days; Intellifont specification is difficult, if not impossible, to get hold of.
(c) PCL Encapsulated TrueType Outline (PCLETTO) fonts.
Downloadable files usually have .sft extension.
The above typography site may have links to tools which may provide font metrics.
Otherwise, consider commercial tools such as FontLab, or the (much cheaper but almost as good?) FontCreator package from High-Logic.
I understand that there are Windows API functions (and presumably equivalent *n*x ones) to return the width of a specified string of characters using a given installed font at a specified point size; so you could get the widths that way, by making repeated calls, each with single-character strings.
On the assumption that the widths are linearly scaled, you could then extrapolate the width values to any other point size; but this may not be valid for small point sizes, where 'hinting' may change the width (I don't know if this is the case or not).
Note that the width returned for a string with multiple characters will probably take kerning pairs into account, so could be less than the sum of the individual character widths.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.