Function renderTxt2Img

  • 将文本渲染为图片

    Parameters

    • txt: string

      要渲染的文本

    • cssText: string

      应用于文本的 CSS 样式

    Returns HTMLImageElement

    渲染后的图片元素