From d36273a74c446dff9debea037d8abb0fe93d1009 Mon Sep 17 00:00:00 2001 From: ru_shalm Date: Sat, 11 Aug 2018 16:47:38 +0900 Subject: [PATCH] fix baseline position on Safari according to Chrome and Firefox --- js/rpg_core/Bitmap.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/rpg_core/Bitmap.js b/js/rpg_core/Bitmap.js index fe331180..90f9c4a9 100644 --- a/js/rpg_core/Bitmap.js +++ b/js/rpg_core/Bitmap.js @@ -634,7 +634,7 @@ Bitmap.prototype.drawText = function(text, x, y, maxWidth, lineHeight, align) { return; } var tx = x; - var ty = y + lineHeight - (lineHeight - this.fontSize * 0.7) / 2; + var ty = y + lineHeight - Math.round((lineHeight - this.fontSize * 0.7) / 2); var context = this._context; var alpha = context.globalAlpha; maxWidth = maxWidth || 0xffffffff;