PrivateFontCollection
Namespace: System.Drawing.Text
Assembly: System.Drawing.Managed (4.0.0.0)
Encapsulates a collection of Font objects. Provides a collection of font families built from font files that are provided by the client application.
- C#
- VB.NET
public class PrivateFontCollection : FontCollection
Public Class PrivateFontCollection
Inherits FontCollection
Constructors
PrivateFontCollection()
Initializes a new instance of the PrivateFontCollection class.
Methods
AddFontFile(filename)
Adds a font from the specified file to this PrivateFontCollection.
| Parameter | Type | Description |
|---|---|---|
| filename | String | A String that contains the file name of the font to add. |
Throws:
- FileNotFoundException The specified font is not supported or the font file cannot be found.
AddMemoryFont(memory, length)
Adds a font contained in system memory to this PrivateFontCollection.
| Parameter | Type | Description |
|---|---|---|
| memory | IntPtr | The memory address of the font to add. |
| length | Int32 | The memory length of the font to add. |