Open
Description
I am trying to add diffrent fontFamily Conditionally but not able to add it this is my code can you tell me what is the issue
const handleCanvas = async (canvas: any, fontFamily: string) => {
const FONT_SIZE = 200;
if (canvas) {
canvas.width = 1000;
canvas.height =200;
const ctx = canvas.getContext('2d');
ctx.textAlign = 'center';
ctx.textBaseline = 'top';
// ctx.font = ${FONT_SIZE}px "${font}"
ctx.font = ${FONT_SIZE}px "${fontFamily}"
;
ctx.fillStyle = penColor;
ctx.fillText(txtInputSignPickState, 550,1);
canvas.toDataURL().then(async (data: any) => {
setpickSignListState(data);
});
}
};
Metadata
Metadata
Assignees
Labels
No labels