Function computeTextSize

Measure multiline text to find only its size. Caches results from previous calls.

SizeOf!(float) computeTextSize (
  dstring str,
  ref TextLayoutStyle style
);

Example

Font font;
dstring txt = "Hello";
auto st = TextLayoutStyle(font);
const Size sz = computeTextSize(txt, st);