Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Font Size Algorithm
Message
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00965827
Message ID:
00965901
Views:
15
This message has been marked as a message which has helped to the initial question of the thread.
Hugo,

If you have to do the calculation a lot you can prebuild a table and do lookups into it rather than iterating a lot.

You could also do a polynomial curve fit if you really didn't want to iterate. It might be worth plotting fontsize as X and height as Y and see how well a 1st or 2nd degree polynomial fit the data for a given font.

Update: ok curiousity got the better of me *g*

For Arial on my XP system:

h = 1.476(pt size) + 1.0714
h = 8e-8(pt size)2 + 1.476(pt size) + 1.0714

>I know David it is not important, I will probably do an iteration, I just wanted to be sure there is no non-iterative way.
df (was a 10 time MVP)

df FoxPro website
FoxPro Wiki site online, editable knowledgebase
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform