Method GetColumnsRequiredForVerticalText
GetColumnsRequiredForVerticalText(List<string>, int, int, int)
Returns the number of columns required to render lines
oriented vertically.
public static int GetColumnsRequiredForVerticalText(List<string> lines, int startLine = -1, int linesCount = -1, int tabWidth = 0)
Parameters
lines
List<string>The lines.
startLine
intThe line in the list to start with (any lines before will be ignored).
linesCount
intThe number of lines to process (if less than
lines.Count
, any lines after will be ignored).tabWidth
intThe number of columns used for a tab.
Returns
- int
The width required.
Remarks
This API will return incorrect results if the text includes glyphs whose width is dependent on surrounding glyphs (e.g. Arabic).