hmFree_GetStringWidth
hmFree_GetStringWidth(Text;Font;Fontsize;Fontstyle) -> width
Parameter Type Description
Text Text -> Text
Font Text -> Fontname
Fontsize Longint -> Fontsize
Fontstyle Longint -> Fontstyle
width Longint <- string width in pixels
The command hmFree_GetStringWidth returns the width of a string, defined by font, fontsize and fontstyle. You can use the predefinied constants of 4D in the parameter Fontstyle.
The following example returns the string width of a text:
C_LONGINT($vl_width)
$vl_width:=hmFree_GetStringWidth("Test";"Arial";10;Bold+Italic)