plotomics
    Preparing search index...

    Function textWidth

    • Width in px of text set at size px in fontFamily, measured on a shared canvas. style is what goes before the size in a CSS font, such as "italic" or "600". Without a canvas (outside a browser) it estimates 0.58 em per character.

      Parameters

      • text: string
      • size: number
      • fontFamily: string
      • style: string = ""

      Returns number