melonjs / melonJS

a fresh, modern & lightweight HTML5 game engine
https://melonjs.org
MIT License
5.93k stars 643 forks source link

Bug in BitmapText scaling #1129

Closed SiLiKhon closed 2 years ago

SiLiKhon commented 2 years ago

When scaling a BitmapText object (through settings.size) the inter-character intervals are off.

I believe the problem is in this line, which should instead be

x + glyph.xoffset * this.fontScale.x,

— at least, such change fixes the problem for me.

obiot commented 2 years ago

this is now fixed with the latest change, thanks for the report !