DekGenius.com
[ Team LiB ] Previous Section Next Section

PrivateFontCollectiondisposable

System.Drawing.Text (system.drawing.dll)sealed class

This class, derived from FontCollection, represents a set of fonts that have not been installed on the system.

You can add a font to the collection using the AddFontFile() and AddMemoryFont() methods. The second of these is a thin wrapper over the unmanaged implementation code, and you should be careful to ensure that the memory you pass in will not be garbage collected before you are done with the collection.

You can then enumerate the Families in the collection in the normal way.

public sealed class PrivateFontCollection : FontCollection {
// Public Constructors
   public PrivateFontCollection();
// Public Instance Methods
   public void AddFontFile(string filename);
   public void AddMemoryFont(IntPtr memory, int length);
// Protected Instance Methods
   protected override void Dispose(bool disposing);  // overrides FontCollection
}

Hierarchy

System.Object FontCollection(System.IDisposable) PrivateFontCollection

    [ Team LiB ] Previous Section Next Section