@argdown/core
    Preparing search index...

    Function addLineBreaks

    • Adds line breaks to a string every x pixels, using string-pixel-width for measuring the width.

      Returns an object containing the new string and the number of lines.

      Only fonts measured by the string-pixel-width library are supported.

      Parameters

      • str: string
      • measurePixelWidth: boolean
      • options: {
            applyRanges?: IRange[];
            bold?: boolean;
            charactersInLine?: number;
            escapeAsHtmlEntities?: boolean;
            font?: string;
            fontSize?: number;
            lineBreak?: string;
            maxWidth?: number;
        }

      Returns { lines: number; text: string }