Skip to content

Commit

Permalink
Merge pull request #152 from mclemente/master
Browse files Browse the repository at this point in the history
Polyglot fixes 2
  • Loading branch information
megahead11 authored Oct 15, 2023
2 parents f31b4c8 + d35d05b commit 728bc6f
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/scripts/theatre_main.js
Original file line number Diff line number Diff line change
Expand Up @@ -349,11 +349,6 @@ Hooks.on("createChatMessage", function (chatEntity, _, userId) {
break;
}
if (Theatre.DEBUG) console.log("font size is (%s): ", insertFontSize, fontSize);
Theatre.instance._applyFontFamily(textBox, insertFontType || Theatre.instance.textFont);
//textBox.style["font-family"] = insertFontType || Theatre.instance.textFont;
textBox.style.color = insertFontColor || "white";
textBox.style["font-size"] = `${fontSize}px`;
textBox.scrollTop = 0;
// If polyglot is active, and message contains its flag (e.g. not an emote), begin processing
if (typeof polyglot !== "undefined" && typeof chatData.flags.polyglot !== "undefined") {
// Get current language being processed
Expand All @@ -369,6 +364,11 @@ Hooks.on("createChatMessage", function (chatEntity, _, userId) {
textContent = game.polyglot.scrambleString(textContent, chatData._id, lang);
}
}
Theatre.instance._applyFontFamily(textBox, insertFontType || Theatre.instance.textFont);
//textBox.style["font-family"] = insertFontType || Theatre.instance.textFont;
textBox.style.color = insertFontColor || "white";
textBox.style["font-size"] = `${fontSize}px`;
textBox.scrollTop = 0;

charSpans = Theatre.splitTextBoxToChars(textContent, textBox);

Expand Down

0 comments on commit 728bc6f

Please sign in to comment.