SheetXL - v1.0.2
    Preparing search index...

    Function measureUIText

    • The width in px the browser paints text at in a UI font: for sizing a control to a sample label (a toolbar button to its widest value). Nothing to do with cells: spreadsheet text is measured by the sdk's font collection, with Excel's numbers.

      Parameters

      Returns number

      A cached canvas measures with the browser's own advances. Where there is no canvas (jsdom, a server) the width is estimated from the character count, which is enough to size a control.