Browse Source

Initialize glyphs if they weren't on draw call. (#443)

Pavel Alexandrov 7 years ago
parent
commit
111cbe4088
1 changed files with 2 additions and 0 deletions
  1. 2 0
      h2d/Text.hx

+ 2 - 0
h2d/Text.hx

@@ -100,6 +100,8 @@ class Text extends Drawable {
 			emitTile(ctx, h2d.Tile.fromColor(0xFF00FF, 16, 16));
 			return;
 		}
+		if ( !calcDone ) initGlyphs(text, false);
+
 		if( dropShadow != null ) {
 			var oldX = absX, oldY = absY;
 			absX += dropShadow.dx * matA + dropShadow.dy * matC;