]> git.kianting.info Git - clo/blobdiff - tests/pdfManipulation.ts
english breakline, and generate try to count the text size
[clo] / tests / pdfManipulation.ts
index 6daaa1445a4bd49f39e93ac771235f83885912ed..9a1d75f9153738ba1c65aadfe5b028be907ca55b 100644 (file)
@@ -6,21 +6,21 @@ let hanziFont = {
     family : "Noto Sans CJK TC",
     size : 12,
     textWeight : canva.TextWeight.REGULAR,
-    textStyle : canva.TextStyle.ITALIC,
+    fontStyle : canva.FontStyle.ITALIC,
 }
 
 let romanFont = {
     family : "FreeSans",
     size : 15,
     textWeight : canva.TextWeight.BOLD,
-    textStyle : canva.TextStyle.ITALIC,
+    fontStyle : canva.FontStyle.ITALIC,
 }
 
 let arabicFont = {
     family : "noto sans arabic",
     size : 16,
     textWeight : canva.TextWeight.REGULAR,
-    textStyle : canva.TextStyle.NORMAL,
+    fontStyle : canva.FontStyle.NORMAL,
 }
 
 
@@ -32,7 +32,7 @@ async function foo (){
 
     let clo =  await {
         mainText : ["123 一隻貓跑過來"],
-        mainFontStyle : hanziFont,
+        mainTextStyle : hanziFont,
         PDFCanvas : doc,
 
     }