I would like to count the number of lines a particular string will occupy when wrapped in a container with a fixed width, and using a given font...
My original problem was getting the height of a row in excel with wrapped text. I've given up on a straightforward solution so I would like to use an algorithm for determining the number of lines occupied (and hence the height of the row).
I realize I can develop my own algorithm making use of Graphics.MeasureString
, but I was wondering if there is an already developed clean solution that won't make me go through this mess.