Fixed: Zero width/height letters (ie space) should not be included in atlas

--HG--
branch : develop
This commit is contained in:
Nimetu 2018-11-19 11:26:31 +02:00
parent 2877ece3c6
commit 8e53cd87e5

View file

@ -516,6 +516,9 @@ CTextureFont::SLetterInfo* CTextureFont::getLetterInfo (SLetterKey& k, bool rend
// letter not found (=NULL) or render not requested
if (!letter || !render) return letter;
// nothing to render, ie space char
if (letter->CharWidth == 0 || letter->CharHeight == 0) return letter;
if (!letter->glyph || letter->glyph->CacheVersion != _CacheVersion)
{
// render glyph