PrivateFontCollection 类  
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
提供一个字体系列集合,该集合是基于客户端应用程序提供的字体文件生成的。
public ref class PrivateFontCollection sealed : System::Drawing::Text::FontCollectionpublic sealed class PrivateFontCollection : System.Drawing.Text.FontCollection[System.Runtime.InteropServices.ComVisible(false)]
public sealed class PrivateFontCollection : System.Drawing.Text.FontCollectiontype PrivateFontCollection = class
    inherit FontCollection[<System.Runtime.InteropServices.ComVisible(false)>]
type PrivateFontCollection = class
    inherit FontCollectionPublic NotInheritable Class PrivateFontCollection
Inherits FontCollection- 继承
- 属性
注解
类 PrivateFontCollection 允许应用程序安装现有字体的专用版本,而无需替换系统版本的字体。 例如,除了系统使用的 Arial 字体之外,GDI+ 还可以创建 Arial 字体的专用版本。 PrivateFontCollection 还可用于安装操作系统中不存在的字体。 这是一个临时字体安装,不会影响系统安装的集合。 若要查看已安装的集合,请使用 InstalledFontCollection 类。
注意
在 .NET 6 及更高版本中, System.Drawing.Common 包(包括此类型)仅在 Windows 操作系统上受支持。 在跨平台应用中使用此类型会导致编译时警告和运行时异常。 有关详细信息,请参阅 仅在 Windows 上支持 System.Drawing.Common。
构造函数
| PrivateFontCollection() | 初始化 PrivateFontCollection 类的新实例。 | 
属性
| Families | 获取与此 FontFamily 关联的 FontCollection 对象的数组。(继承自 FontCollection) | 
方法
| AddFontFile(String) | 将字体从指定文件添加到该 PrivateFontCollection。 | 
| AddMemoryFont(IntPtr, Int32) | 将包含在系统内存中的字体添加到该 PrivateFontCollection。 | 
| Dispose() | 释放此 FontCollection 使用的所有资源。(继承自 FontCollection) | 
| Dispose(Boolean) | 释放由 FontCollection 占用的非托管资源,还可以另外再释放托管资源。(继承自 FontCollection) | 
| Equals(Object) | 确定指定对象是否等于当前对象。(继承自 Object) | 
| GetHashCode() | 作为默认哈希函数。(继承自 Object) | 
| GetType() | 获取当前实例的 Type。(继承自 Object) | 
| MemberwiseClone() | 创建当前 Object 的浅表副本。(继承自 Object) | 
| ToString() | 返回表示当前对象的字符串。(继承自 Object) |