From ae08163e687ff522986128d42f98f1f71e4a775f Mon Sep 17 00:00:00 2001 From: goat <16760685+goaaats@users.noreply.github.com> Date: Thu, 27 May 2021 03:50:39 +0200 Subject: [PATCH] Add FC tag --- create-card.js | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/create-card.js b/create-card.js index 3f61f9d..10c5626 100644 --- a/create-card.js +++ b/create-card.js @@ -313,9 +313,18 @@ class CardCreator { if (crestImage !== null) ctx.drawImage(crestImage, fcCrestX, fcCrestY, fcCrestScale, fcCrestScale); + + const fcMeasure = ctx.measureText(data.Character.FreeCompanyName); ctx.fillText(data.Character.FreeCompanyName, 480, infoTextBigStartY + infoTextSpacing * 3); + + ctx.fillStyle = grey; + ctx.font = small; + ctx.fillText(`«${data.FreeCompany.Tag}»`, 480 + fcMeasure.width + 10, infoTextBigStartY + infoTextSpacing * 3); } + ctx.font = smed; + ctx.fillStyle = white; + // Minion & Mount percentages var mountsPct = '??'; if (data.Mounts !== null) {