Tag Archives: SetMeasurableCharacterRanges

Measure character positions when drawing long strings in C#

The example Measure character positions in a drawn string in C# uses the Graphics class’s MeasureCharacterRanges method to find the positions where characters in a string will be drawn. Unfortunately this method requires you to call a StringFormat object’s SetMeasurableCharacterRanges … Continue reading

Posted in algorithms, drawing, fonts, graphics, strings | Tagged , , , , , , , , , , , , , , , | Leave a comment

Measure character positions in a drawn string in C#

You can use the Graphics class’s MeasureCharacterRanges method to measure character positions in a drawn string. This method returns information about the regions where strings of characters would be drawn by the Graphics object’s DrawString method. The DrawStringWithCharacterBounds method shown … Continue reading

Posted in algorithms, drawing, fonts, graphics, strings | Tagged , , , , , , , , , , , , , , , | 3 Comments