I dont think you can. It would depend on the font and font size. Using a monospaced font with a fixed size perhaps can help you.
Theres a custom function on Brian Dunning's Website (if I remember correctly) which may help, although it could never really be accurate.
Different characters (unless fixed width are used) have different pixel values.
The custom function relies on a fixed font & size and then basically substitutes each letter for a pixel value.
Something along these lines (but I made the values up)
A = 5
B = 5
I = 3
W = 7
Can you not achieve the desired effect by limiting characters