From c8d417a4e3065bfc0832c9fb9fd2c1dd7dae5277 Mon Sep 17 00:00:00 2001 From: Kyle <41976328+ImKyle4815@users.noreply.github.com> Date: Fri, 24 Apr 2020 14:56:41 -0700 Subject: [PATCH] italics fix --- data/scripts/main.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/data/scripts/main.js b/data/scripts/main.js index a96d0e01..bb3dfa97 100644 --- a/data/scripts/main.js +++ b/data/scripts/main.js @@ -454,8 +454,10 @@ function writeText(textObjectList, targetContext) { fontStyle += 'italic ' textLineContext.font = fontStyle + textSize + 'px ' + textFont } else if (possibleCodeLower == '/i') { - fontStyle.replace('italic ', '') + console.log(fontStyle) + fontStyle = fontStyle.replace('italic ', '') textLineContext.font = fontStyle + textSize + 'px ' + textFont + console.log(textLineContext.font) } else if (possibleCodeLower.includes('fontsize')) { textSize += parseInt(possibleCodeLower.slice(8, possibleCodeLower.length)) textLineContext.font = fontStyle + textSize + 'px ' + textFont