Just in case Stephen's code doesn't do what you want:
On
http://www.adobe.com you should be able to find:
Adobe Font Metric File Format Specification (#5004)
If you have the .afm file, it contains the information you need to
determine precisely how much space the characters in a font will use.
I usually ignore the kerning information since my uses don't require
that much accuracy. The following file (zipped A97 format) contains
character size information (no kerning info) for the 14 standard fonts
used for pdf documents:
http://www.oakland.edu/~fortune/FontMetrics.zip
To get the width the characters will take I use:
Public Function GetFontWidth(strIn As String, strFontName As String,
dblFontSize As Double) As Double
Dim lngTemp As Long
Dim MetricRS As Recordset
Dim MyDB As Database
Dim strSQL As String
Dim intI As Integer
Dim strChar As String
Dim lngASC As Long
GetFontWidth = 0#
If Len(strIn) = 0 Then Exit Function
lngTemp = 0
Set MyDB = CurrentDb
strSQL = "SELECT * FROM tbl" & strFontName & "Metrics;"
Set MetricRS = MyDB.OpenRecordset(strSQL, dbOpenSnapshot)
For intI = 1 To Len(strIn)
strChar = Mid(strIn, intI, 1)
lngASC = Asc(strChar)
MetricRS.FindFirst "[ASCIINumber] = " & CStr(lngASC)
If Not MetricRS.NoMatch Then
lngTemp = lngTemp + MetricRS("Width")
End If
Next intI
MetricRS.Close
Set MetricRS = Nothing
Set MyDB = Nothing
GetFontWidth = lngTemp * dblFontSize / 1000#
End Function
The fonts you mention are TrueType. More than you'll ever want to know
about TrueType fonts can be found at:
http://www.truetype.demon.co.uk/index.htm
Note that different characters produce different widths in proportional
fonts (most fonts). Courier is an example of a fixed-width font.
There are 20 twips to a PostScript point. There are 72 PostScript
points to an inch.
James A. Fortune
The default unit size (1/72 inch) is approximately the same as a
"point," a unit widely used in the printing industry. It is not
exactly the same as a point, however; there is no universal definition
of a point.
-- Postscript Language Reference Manual, Third Edition, Adobe Systems
Incorporated