Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Part of the string - in Bold
Message
De
10/01/2001 11:53:15
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire de rapports & Rapports
Divers
Thread ID:
00461366
Message ID:
00461692
Vues:
57
This message has been marked as a message which has helped to the initial question of the thread.
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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform