> If there are only cosmetic objections, I'd like to see this patch accepted, > and work of further improvements after that.
I asked Alexandre to wait until I had more time to understand/test this patch. It seems you've introduced a problem with scaling (see attached test program and screenshot). I think that MeasureString is working correctly in this case, and DrawString/MeasureCharacterRanges are wrong. This sort of problem would be less likely if the logic were in gdip_format_string.
<<attachment: screenshot.png>>
measuretext.7z
Description: Binary data