[email protected] 7 years ago
parent
commit
d749f8df63
1 changed files with 9 additions and 1 deletions
  1. 9 1
      src/ResFontFT.cpp

+ 9 - 1
src/ResFontFT.cpp

@@ -200,7 +200,14 @@ namespace oxygine
                 gd.gl = &g;
                 gd.opt = opt;
                 gd.font = this;
-                _ftGen(gd);
+
+
+                if (src.w && src.h)
+                    _ftGen(gd);
+                else
+                {
+                    tempImage.init(0, 0, TF_R8G8B8A8);
+                }
 
                 _rs->_atlas.add(tempImage.lock(), srcRect, t);
                 OX_ASSERT(t);
@@ -211,6 +218,7 @@ namespace oxygine
                 g.texture = safeSpCast<NativeTexture>(t);
             }
 
+
             g.sw = tempImage.getWidth();
             g.sh = tempImage.getHeight();