I am generating a png image that contains a text dinamically written. I need to create the bitmap with the minimum width for file size reasons.
views:
57answers:
2
A:
You can also use TextRenderer for slightly more accuracy. See this article for differences between this and Graphics.MeasureString :
James Westgate
2010-03-31 19:17:18
It doesn't return exactly the same results as Graphics.MeasureString, so If the OP wants to know the size of the string actually drawn by the Graphics, Graphics.MeasureString is a better choice
Thomas Levesque
2010-03-31 19:22:29
Agreed ........
James Westgate
2010-03-31 20:04:34