From 4428d0ac933482274d09862fd984ac8ede681f7c Mon Sep 17 00:00:00 2001 From: chai Date: Wed, 3 Nov 2021 13:29:01 +0800 Subject: *font space --- Runtime/GUI/UITextMesh.cpp | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) (limited to 'Runtime/GUI/UITextMesh.cpp') diff --git a/Runtime/GUI/UITextMesh.cpp b/Runtime/GUI/UITextMesh.cpp index 32dec3b..823335f 100644 --- a/Runtime/GUI/UITextMesh.cpp +++ b/Runtime/GUI/UITextMesh.cpp @@ -75,16 +75,19 @@ UITextMesh::UITextMesh(const UnicodeString& str, Font* font,int pixelSize, EText continue; unsigned int atlasIndex = ch->atlas; - TextInfo info; - info.ch = ch; - info.offset = offset; + if (atlasIndex != FONT_NOT_IN_ATLAS_PLACEHOLDER) //·Ç¿Õ¸ñ + { + TextInfo info; + info.ch = ch; + info.offset = offset; - auto list = s_TextInfos.find(atlasIndex); - if (list == s_TextInfos.end()) - s_TextInfos.insert(std::pair>(atlasIndex, vector())); + auto list = s_TextInfos.find(atlasIndex); + if (list == s_TextInfos.end()) + s_TextInfos.insert(std::pair>(atlasIndex, vector())); - vector& v = s_TextInfos[atlasIndex]; - v.push_back(info); + vector& v = s_TextInfos[atlasIndex]; + v.push_back(info); + } offset += ch->advance; } -- cgit v1.1-26-g67d0