Nadya, i think i have a problem identic ...
I'm designing a Report too, and as a good "Report Designer" it as to give the possibility of the user say the font name and size.
The PROBLEM is in the weight and width, is diferent from one font to another.
I ALLMOST solve the all problem, but is gives a little diferent in some font's.
#define g_RptConverteFACTOR 104.166666666667
** Text Width **
lnSize = TXTWIDTH(DisplayText,FontName, FontSize) * FONTMETRIC(6, FontName, FontSize)
lnSize = Round(lnSize * g_RptConverteFACTOR, 3)
** Text height **
lnSize = FONTMETRIC(1, FontName, FontSize)
lnSize = Round(lnSize * g_RptConverteFACTOR, 3)
With this two "Formulas" i can get the size (height/width) to report of any field in any font and size.
. Font | Form | Report | My Formula
.--------------+--------+------------+-------------
.Arial 4 | 8 | 625.000 | 625.000
. 9 | 17 | 1562.500 | 1562.500
. 18 | 29 | 2916.667 | 2916.667
. 24 | 38 | 3854.167 | 3750.000 ????
See the ??? (MyFormula), there is the "matematic error".
If this help in your report, and you can help me solving the little problem say ok ?
Nuno Brito