Skip to content

Commit d36273a

Browse files
committed
fix baseline position on Safari according to Chrome and Firefox
1 parent c684f72 commit d36273a

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)