Skip to content

Commit ee60906

Browse files
fix: text input signature font-family for mobile view
1 parent 852a3dc commit ee60906

File tree

2 files changed

+17
-10
lines changed

2 files changed

+17
-10
lines changed

microfrontends/SignDocuments/src/Component/component/signPad.js

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -32,11 +32,10 @@ function SignPad({
3232
const [signValue, setSignValue] = useState("");
3333
const [textWidth, setTextWidth] = useState(null);
3434
const fontOptions = [
35-
{ value: "Lucida Handwriting" },
36-
{ value: "Segoe Script" },
37-
{ value: "Harrington" },
38-
{ value: "cursive" }
39-
35+
{ value: "Fasthand" },
36+
{ value: "Dancing Script" },
37+
{ value: "Cedarville Cursive" },
38+
{ value: "Delicious Handrawn" }
4039
// Add more font options as needed
4140
];
4241
const [fontSelect, setFontSelect] = useState(fontOptions[0].value);
@@ -153,7 +152,7 @@ function SignPad({
153152

154153
// Create a canvas with the calculated width
155154
const canvas = document.createElement("canvas");
156-
canvas.width = textWidth * pixelRatio + 20 * pixelRatio;
155+
canvas.width = textWidth * pixelRatio + 30 * pixelRatio;
157156
canvas.height = 20 * pixelRatio; // You can adjust the height as needed
158157
setTextWidth(textWidth * pixelRatio);
159158
// Draw the text content on the canvas
@@ -164,7 +163,6 @@ function SignPad({
164163

165164
// Convert the canvas to image data
166165
const dataUrl = canvas.toDataURL("image/png");
167-
168166
setSignature(dataUrl);
169167
};
170168

@@ -199,8 +197,6 @@ function SignPad({
199197
justifyContent: "space-around",
200198
alignItems: "end",
201199
gap: 10
202-
203-
// background: themeColor(),
204200
}}
205201
>
206202
{isStamp ? (

microfrontends/SignDocuments/src/css/signature.css

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
@import url('https://fonts.googleapis.com/css2?family=Fasthand&display=swap');
2+
@import url('https://fonts.googleapis.com/css2?family=Dancing+Script&display=swap');
3+
@import url('https://fonts.googleapis.com/css2?family=Delicious+Handrawn&display=swap');
4+
@import url('https://fonts.googleapis.com/css2?family=Cedarville+Cursive&display=swap');
5+
16
.signatureCanvas {
27
border: 2px solid #888;
38
background-color: rgb(255, 255, 255);
@@ -810,6 +815,12 @@ option {
810815
.mobileHead {
811816
display: flex;
812817
}
818+
.signTab {
819+
820+
font-weight: 500 !important;
821+
822+
font-size: 10px !important;
823+
}
813824

814825
}
815826

@@ -868,7 +879,7 @@ option {
868879

869880
font-weight: 500 !important;
870881

871-
font-size: 10px !important;
882+
font-size: 8px !important;
872883
}
873884

874885
.uploadImgLogo {

0 commit comments

Comments
 (0)