Hassan,
" number of line characters * size of font"
I didn't think that worked, or am I missing a function that exists somewhere?
Different type faces have very different pixel widths for their characters (so that "A" in 10 point Verdana would take more pixels than "A" in Times New Roman, etc), and in most fonts (except the fixed ones such as Courier), the letter "i" would be much thinner than "x", for example.
Your method would calculate the same number of pixels for all characters , including full stops ".", regardess fo type face or character involved, wouldn't it?
The DBPro method works wonderfully well, but I'm not sure that there is an equivalent in GDK. If there is, I'd love to see the example. I have been struggling with this one for a couple of weeks, on and off.
Amazing Simulation
www.amazing-forum.com