public static TTFTextInternal.TextureMapManager GetTextureMapManager(string fontprovider, string fontid, System.Func <char, TTFTextTexturePortion> gen)
        {
            int i = 0;

            foreach (TTFTextInternal.TextureMapManager tam in fontcache)
            {
                if ((tam.fontprovider == fontprovider) && (tam.name == fontid))
                {
                    if (i == 0)
                    {
                        return(tam);
                    }
                    else
                    {
                        fontcache.Remove(tam);
                        fontcache.AddFirst(tam);
                        return(tam);
                    }
                }
                i++;
            }

            TTFTextInternal.TextureMapManager xtam = new TextureMapManager(fontprovider, fontid, gen);
            fontcache.AddFirst(xtam);
            if (fontcache.Count > maxMaps)
            {
                fontcache.Last.Value.Dispose();
                fontcache.RemoveLast();
            }
            return(xtam);
        }
        public static TTFTextInternal.TextureMapManager GetTextureMapManager(string fontprovider,string fontid,System.Func<char,TTFTextTexturePortion> gen)
        {
            int i=0;
            foreach(TTFTextInternal.TextureMapManager tam in fontcache) {
            if ((tam.fontprovider==fontprovider)&&(tam.name==fontid)) {
              if (i==0) {
                return tam;
              }
               	  else {
                fontcache.Remove(tam);
                fontcache.AddFirst(tam);
                return tam;
              }
            }
            i++;

            }

            TTFTextInternal.TextureMapManager xtam=new TextureMapManager(fontprovider, fontid,gen);
            fontcache.AddFirst(xtam);
            if (fontcache.Count>maxMaps) {
                fontcache.Last.Value.Dispose();
                fontcache.RemoveLast();
            }
            return xtam;
        }