Method GetSumMaxCharWidth
GetSumMaxCharWidth(string, int, int, int)
Gets the maximum number of columns from the text based on the startIndex
and the
length
.
public static int GetSumMaxCharWidth(string text, int startIndex = -1, int length = -1, int tabWidth = 0)
Parameters
text
stringThe text.
startIndex
intThe start index.
length
intThe length.
tabWidth
intThe number of columns used for a tab.
Returns
- int
The maximum characters width.
Remarks
This API will return incorrect results if the text includes glyphs whose width is dependent on surrounding glyphs (e.g. Arabic).