From 81229237d268b54b3c31fc90c1df77125076c45b Mon Sep 17 00:00:00 2001 From: rexim Date: Sun, 18 Feb 2024 00:50:06 +0700 Subject: [PATCH] Fix the DrawText Y positioning --- raylib.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/raylib.js b/raylib.js index 59326cf..a6a0154 100644 --- a/raylib.js +++ b/raylib.js @@ -172,7 +172,7 @@ class RaylibJs { const lines = text.split('\n'); for (var i = 0; i < lines.length; i++) { - this.ctx.fillText(lines[i], posX, posY + (i * fontSize)); + this.ctx.fillText(lines[i], posX, posY + fontSize + (i * fontSize)); } }