Function Font.textSize

Measure text string as single line, returns width and height

Point textSize(
  dstring text,
  int maxWidth = 2147483647,
  int tabSize = 4,
  int tabOffset = 0,
  uint textFlags = 0u
);

Parameters

NameDescription
text text string to measure
maxWidth maximum width - measure is stopping if max width is reached
tabSize tabulation size, in number of spaces
tabOffset when string is drawn not from left position, use to move tab stops left/right
textFlags TextFlag bit set - to control underline, hotkey label processing, etc...