Skip to content

Commit 69db961

Browse files
authored
Merge pull request rpgtkoolmv#173 from rutan/fix/text_body_for_safari
fix baseline position on Safari according to Chrome and Firefox
2 parents b2c3160 + d36273a commit 69db961

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

js/rpg_core/Bitmap.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -634,7 +634,7 @@ Bitmap.prototype.drawText = function(text, x, y, maxWidth, lineHeight, align) {
634634
return;
635635
}
636636
var tx = x;
637-
var ty = y + lineHeight - (lineHeight - this.fontSize * 0.7) / 2;
637+
var ty = y + lineHeight - Math.round((lineHeight - this.fontSize * 0.7) / 2);
638638
var context = this._context;
639639
var alpha = context.globalAlpha;
640640
maxWidth = maxWidth || 0xffffffff;

0 commit comments

Comments
 (0)