Skip to content
VN_fnc_UI_checkFontSize

VN_fnc_UI_checkFontSize

  • decreasing fontsize (sizeEx) for 1-line TextCtrls, to fit in the width of the given ctrl.
  • updates the ctrl at the end automaticaly (minimum: 0.02)

Syntax

[_ctrl,_text,_fontSize,_font] call VN_fnc_UI_checkFontSize;

Parameters

ParameterTypeDefaultDescription
_ctrl Control— Control
_text String— Text
_fontSize Number0.12 sizeEx to start with
_font StringUSEDFONT Font to use

Examples

- [_RscTextCtrl, "I am a long text wich probably doesn't fit in a tiny control"] call vn_fnc_checkFontSize;
- [_RscTextCtrl, "I am a long text wich probably doesn't fit in a tiny control", 0.5, "RobotoCondensed"] call vn_fnc_checkFontSize;

Documented by Dscha.