DarkBASIC Professional Help File

DX11 GET TEXT WIDTH

Computes the width (in pixels) required to print the provided string with the specified font.
Special cases like new lines, tabs and colour setting sequences are properly handled.

Syntax

    Return Dword = DX11 GET TEXT WIDTH(font, text)

Parameters

    font

> Dword
> The font to use to determine individual character sizes of the text to compute the size requirements for.

    text

> String
> The text to compute the required width to display with the above font.

Returns

The width required to display the specified text written in the given font.

See also

FONT Functions Menu
DX11 Function Categories