Please enable JavaScript to view this site.

 

int = TextWidth(sSomeText, sFontName, bIsBold)

 

This macro function estimates the width in pixels that will be taken up by the string sSomeText, using the font sFontName, in size 8, the text being in bold, or not, according to the value of bIsBold.

 

The font sFontName must be installed on the computer when this function is called.

 

This function uses Windows font measurements. Its result is an estimate and may differ from the text width produced by QuarkXPress or InDesign.

 

See also: StrLength.

 


Topic 174460, last updated on 16-Oct-2026