Merge pull request #668 from zilongshanren/fix-multiple-bmfont-packer-issue

fix multiple bmfont packer rendering issue
This commit is contained in:
Wang Nan
2017-06-22 14:25:03 +08:00
committed by GitHub
+1 -1
View File
@@ -97,7 +97,7 @@ FontAtlas* FontAtlasCache::getFontAtlasFNT(const std::string& fntDataString,
auto realFontFilename = spriteFrame->getTexture()->getPath();
char tmp[ATLAS_MAP_KEY_BUFFER];
snprintf(tmp, ATLAS_MAP_KEY_BUFFER, "%.2f %.2f %s", imageOffset.x, imageOffset.y, realFontFilename.c_str());
snprintf(tmp, ATLAS_MAP_KEY_BUFFER, "%.2f %.2f %s %p", imageOffset.x, imageOffset.y, realFontFilename.c_str(), spriteFrame);
std::string atlasName = tmp;
auto it = _atlasMap.find(atlasName);