• Calculates the appropriate font size and ratio for an SVG element based on the bounding box of the SVG and the dimensions of the document body.

    Parameters

    • svgBB: Box

      The bounding box of the SVG element.

    • baseValue: number

      The base value to calculate the font size.

    • maxFontSize: number = Infinity

      The maximum allowed font size.

    Returns {
        ratio: number;
        size: string;
    }

    The calculated font size and ratio.

    • ratio: number
    • size: string