alexa
menu

UWP

  • Code Examples
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download

    Show / Hide Table of Contents

    Class FontManager

    Provides centralized management of shared font resources used across document

    Inheritance
    System.Object
    FontManager
    Namespace: Syncfusion.Drawing.Fonts
    Assembly: Syncfusion.Pdf.UWP.dll
    Syntax
    public class FontManager : Object
    Remarks

    FontManager maintains common font caches to optimize performance and reduce duplication. Font instances are cached to reuse during batch conversions and long-running services. Automatic cleanup is coordinated via a System.Timers.Timer controlled by Delay. When the delay elapses, unused or idle font objects are disposed and removed from caches. For deterministic cleanup, call ClearCache() to immediately purge all managed caches.

    Properties

    Delay

    Gets or sets the delay (in milliseconds) used to schedule disposal of font objects managed by FontManager.

    Declaration
    public static double Delay { get; set; }
    Property Value
    Type
    System.Double
    Remarks

    When fonts are no longer referenced or marked as unused, an internal System.Timers.Timer is configured with the specified Delay value to trigger disposal and removal of those fonts from the caches.

    The default delay is 30000 milliseconds, and the value must be between 1 and 2,147,483,647 milliseconds.

    Methods

    ClearCache()

    Immediately clears all font caches managed by FontManager.

    Declaration
    public static void ClearCache()
    Remarks

    This method forcefully removes and disposes all font instances maintained in the shared caches. Use this to reclaim memory deterministically, instead of waiting for timeout defined in the Delay property. This method can be called when shutting down an application domain or after completing a batch conversion. Even if this method is not called, the unused fonts in cache will be disposed one by one automatically after the timeout defined in the Delay property.

    Extension Methods

    DateTimeExtension.ToDateTime(Object)
    Back to top Generated by DocFX
    Copyright © 2001 - 2026 Syncfusion Inc. All Rights Reserved