fix: font style for first time on save text signature

This commit is contained in:
RaktimaNXG
2024-01-03 13:07:59 +05:30
parent e286390aec
commit 081dae0b90
@@ -145,7 +145,11 @@ function SignPad({
const convertToImg = async (fontStyle) => {
//get text content to convert in image
const textContent = signValue;
const fontfamily = fontStyle ? fontStyle : fontSelect;
const fontfamily = fontStyle
? fontStyle
: fontSelect
? fontSelect
: fontOptions[0].value;
// Calculate the width of the text content
const textWidth = getTextWidth(textContent, fontfamily);
// Increase pixel ratio for higher resolution