Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

text2img

rezanehzati15ISC1.2.0

Convert text with font specification to image format

text, signature, image, base64, imagedata, source, custom, textToCanvas, textToImage, googlefonts, fonts, generate, automatically, html5, css3, css, javascript

readme

textToImg

Convert text with font specification to image format

See Demo

How to use 

var optionsParameter = {
      width: 700,
      height: 220,
      paddingX: 20,
      paddingY: 100,
      canvasTargetDomId: "canvasTargetDom",
      font: ["50px", "Homemade Apple"],
      color: "black",
      textString: 'reza nehzati',
      customFont: {
        name: "Homemade Apple",
        url:
          "https://fonts.gstatic.com/s/homemadeapple/v10/Qw3EZQFXECDrI2q789EKQZJob0x6XH0.ttf"
      }
    };
    let textSignature =  new TextSignature(optionsParameter);

HTML target element

<div id="canvasTargetDom" />