PrivateFontCollection.AddMemoryFont Method (IntPtr, Int32)


The .NET API Reference documentation has a new home. Visit the .NET API Browser on to see the new experience.

Adds a font contained in system memory to this PrivateFontCollection.

Namespace:   System.Drawing.Text
Assembly:  System.Drawing (in System.Drawing.dll)

public void AddMemoryFont(
	IntPtr memory,
	int length


Type: System.IntPtr

The memory address of the font to add.

Type: System.Int32

The memory length of the font to add.

To use the memory font, text on a control must be rendered with GDI+. Use the SetCompatibleTextRenderingDefault method, passing true, to set GDI+ rendering on the application, or on individual controls by setting the control's UseCompatibleTextRendering property to true. Some controls cannot be rendered with GDI+.

.NET Framework
Available since 1.1
Return to top