textBaseline

This commit is contained in:
Kyle
2018-12-22 12:17:12 -08:00
parent 3d2c0a85a2
commit 600c371975
6 changed files with 54 additions and 41 deletions

View File

@@ -52,8 +52,8 @@ function bottomInfo8th() {
card.fillStyle = document.getElementById("inputInfoColor").value
canvas.style.letterSpacing = "1px"
card.font = "25px matrixb"
card.fillText(document.getElementById("inputArtist").value, 116, infoY + textBaselineShift)
card.fillText(document.getElementById("inputArtist").value, 116, infoY + textBaselineShift[0] * card.font.split("px")[0])
canvas.style.letterSpacing = "0.5px"
card.font = "16px mplantin"
card.fillText("CC \u2014 " + document.getElementById("inputInfo").value + " " + document.getElementById("inputNumber").value, 62, infoY + 31 + textBaselineShift)
card.fillText("CC \u2014 " + document.getElementById("inputInfo").value + " " + document.getElementById("inputNumber").value, 62, infoY + 31 + textBaselineShift[0] * card.font.split("px")[0])
}