From e600022c4cfe59e7c3930b56b5b79ebc70d682b1 Mon Sep 17 00:00:00 2001 From: zilongshanren Date: Wed, 21 Jun 2017 11:35:08 +0800 Subject: [PATCH] fix multiple bmfont packer rendering issue --- native/cocos/2d/CCFontAtlasCache.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/native/cocos/2d/CCFontAtlasCache.cpp b/native/cocos/2d/CCFontAtlasCache.cpp index 8dc5924ca0..23f7d98b51 100644 --- a/native/cocos/2d/CCFontAtlasCache.cpp +++ b/native/cocos/2d/CCFontAtlasCache.cpp @@ -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);