public static CCFontAtlas GetFontAtlasFNT (string fontFileName, CCVector2 imageOffset = default(CCVector2)) { string atlasName = GenerateFontName(fontFileName, 0, GlyphCollection.Custom,false); var atlasAlreadyExists = atlasMap.ContainsKey(atlasName); if (!atlasAlreadyExists) { var font = new CCFontFNT(fontFileName, imageOffset); if (font != null) { var tempAtlas = font.CreateFontAtlas(); if (tempAtlas != null) { atlasMap[atlasName] = tempAtlas; return atlasMap[atlasName]; } } } else { return atlasMap[atlasName]; } return null; }
public static CCFontAtlas GetFontAtlasFNT(string fontFileName, CCVector2 imageOffset = default(CCVector2)) { string atlasName = GenerateFontName(fontFileName, 0, GlyphCollection.Custom, false); var atlasAlreadyExists = atlasMap.ContainsKey(atlasName); if (!atlasAlreadyExists) { var font = new CCFontFNT(fontFileName, imageOffset); if (font != null) { var tempAtlas = font.CreateFontAtlas(); if (tempAtlas != null) { atlasMap[atlasName] = tempAtlas; return(atlasMap[atlasName]); } } } else { return(atlasMap[atlasName]); } return(null); }
public static CCFontAtlas GetFontAtlasFNT(CCFontFNT font, CCVector2 imageOffset = default(CCVector2)) { if (font != null) { var atlasName = font.Configuration.AtlasName; var tempAtlas = font.CreateFontAtlas(); if (tempAtlas != null) { atlasMap[atlasName] = tempAtlas; return(atlasMap[atlasName]); } } return(null); }
public static CCFontAtlas GetFontAtlasFNT(CCFontFNT font, CCVector2 imageOffset = default(CCVector2)) { if (font != null) { var atlasName = font.Configuration.AtlasName; var tempAtlas = font.CreateFontAtlas(); if (tempAtlas != null) { atlasMap[atlasName] = tempAtlas; return atlasMap[atlasName]; } } return null; }