Skip to content

Commit 9116edd

Browse files
committed
Some Bitmap Text fonts were not rendering under Canvas due to the way in which the texture offset was calculated. It now uses the __BASE frame to get the texture offset, rather than the first frame in the set. Fix phaserjs#5462 phaserjs#5501
1 parent b1697f5 commit 9116edd

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/gameobjects/bitmaptext/static/BitmapTextCanvasRenderer.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ var BitmapTextCanvasRenderer = function (renderer, src, camera, parentMatrix)
3434

3535
camera.addToRenderList(src);
3636

37-
var textureFrame = src.frame;
37+
var textureFrame = src.texture.frames['__BASE'];
3838

3939
var chars = src.fontData.chars;
4040
var lineHeight = src.fontData.lineHeight;
@@ -57,7 +57,7 @@ var BitmapTextCanvasRenderer = function (renderer, src, camera, parentMatrix)
5757
var lastGlyph = null;
5858
var lastCharCode = 0;
5959

60-
var image = src.frame.source.image;
60+
var image = textureFrame.source.image;
6161

6262
var textureX = textureFrame.cutX;
6363
var textureY = textureFrame.cutY;

0 commit comments

Comments
 (0)