Function splitTextByWidth

  • [en] Split text to draw text within specifed width.

    [jp] 文字を指定幅に描画できる範囲に収まるよう、文字列を分割

    Example

    splitTextByWidth("foobarbaz", 20, "20px Meirio", false)
    

    Returns

    lines

    Parameters

    • text: string
    • borderWidth: number
    • font: string | FontData = builtInDefaultFontPropValue

      css font or FontData

    • applyKinsoku: boolean = true

      Apply text rules for East Asian language

    Returns string[]

Generated using TypeDoc