From 8e53cd87e5dfa68f5bee8b1363058b8fc1004488 Mon Sep 17 00:00:00 2001 From: Nimetu Date: Mon, 19 Nov 2018 11:26:31 +0200 Subject: [PATCH] Fixed: Zero width/height letters (ie space) should not be included in atlas --HG-- branch : develop --- code/nel/src/3d/texture_font.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/code/nel/src/3d/texture_font.cpp b/code/nel/src/3d/texture_font.cpp index eac8cb545..5977a8e5a 100644 --- a/code/nel/src/3d/texture_font.cpp +++ b/code/nel/src/3d/texture_font.cpp @@ -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