• Scales a font size depending on a context's width/height

    Returns

    the fontSize scaled

    See

    https://matthewjamestaylor.com/responsive-font-size#fluid

    Parameters

    • fontSize: number

      size of the font to scale

    • Optional scaleUnit: ScaleUnit

      the scaling unit (uses "width" as unit if a number is supplied)

    • Optional ctx: ScaleContext

      the context where to apply the scaling

    Returns number