- Documentation
- Client functions
- dxGetTextSize
Function
dxGetTextSize
Returns the width and height of a block of text, also when wrapped to a given width.
Syntax
float, float dxGetTextSize(string text [, float width = 0, float scaleX = 1, float scaleY, string|font font = "default", bool wordBreak = false, bool colorCoded = false])Arguments
textstring- The text.
widthfloat, optional = 0- Wrap width.
scaleXfloat, optional = 1- Horizontal scale.
scaleYfloat, optional- Vertical scale.
fontstring|font, optional = "default"- Font.
wordBreakbool, optional = falsetrue= wrap.colorCodedbool, optional = false- Skip colour codes.
Returns
Width and height.
Example
local w, h = dxGetTextSize("Długi opis zadania, który się zawija", 200, 1, 1, "default", true)