From 081dae0b903f70b2e79d05fbc21a0b8c7db88a2b Mon Sep 17 00:00:00 2001 From: RaktimaNXG Date: Wed, 3 Jan 2024 13:07:59 +0530 Subject: [PATCH] fix: font style for first time on save text signature --- .../SignDocuments/src/Component/component/signPad.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/microfrontends/SignDocuments/src/Component/component/signPad.js b/microfrontends/SignDocuments/src/Component/component/signPad.js index 1eb483568..211ba0a8e 100644 --- a/microfrontends/SignDocuments/src/Component/component/signPad.js +++ b/microfrontends/SignDocuments/src/Component/component/signPad.js @@ -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