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);