1.0.0 • Published 4 years ago
texttoimg v1.0.0
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" />
1.0.0
4 years ago