mirror of
https://github.com/OpenSignLabs/OpenSign.git
synced 2026-08-25 00:52:34 +02:00
fix: font style for first time on save text signature
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user