/// <devdoc> /// Dispose of all cached WindowsFont objects and reset the collection. /// </devdoc> public static void ResetFontCache() { if (WindowsFontCache.Count > 0) { for (int index = 0; index < WindowsFontCache.Count; index++) { WindowsFontCache[index].Value.Dispose(); } WindowsFontCache.Clear(); currentIndex = -1; #if GDI_FONT_CACHE_TRACK Debug.WriteLine("Font cache reset. Count: " + WindowsFontCache.Count); #endif } }