FontOps.$reptextwidth()

Function group Execute on client Platform(s)
FontOps NO All

Syntax

FontOps.$reptextwidth(string,font-name|font-table-index,point-size[,font-style])

Description

Returns the width in inches/cms (depending on $usecms preference) required to draw the string using the specified report font. The units of the returned value are determined by $root.$prefs.$usecms.

Example

Do  FontOps.$reptextwidth('Hello WWW','Arial',24) Returns lWidth
# returns 1.83 inches / 4.66 cms

Do FontOps.$reptextwidth('Hello WWW','Arial',24,kBold+kItalicReturns lWidth
# returns 1.85 inches / 4.71 cms

Do FontOps.$reptextwidth('Hello WWW',2,72,kBold+kItalicReturns lWidth
# returns 5.40 inches / 13.81 cms
# note that Courier font is at position 2 in #WIRFONTS