PrivateFontCollection::AddMemoryFont 方法 (gdiplusheaders.h)
PrivateFontCollection::AddMemoryFont 方法将系统内存中包含的字体添加到 Windows GDI+ 字体集合。
语法
Status AddMemoryFont(
[in] const VOID *memory,
[in] INT length
);
参数
[in] memory
类型: const VOID*
指向内存中包含的字体的指针。
[in] length
类型: INT
指定字体中数据的字节数的整数。
返回值
类型: 状态
如果方法成功,则返回 Ok,这是 Status 枚举的元素。
如果 方法失败,它将返回 Status 枚举的其他元素之一。
注解
使用 GDI+ API 时,绝不能允许应用程序从不受信任的源下载任意字体。 操作系统需要提升的权限,以确保所有已安装的字体都受信任。
要求
要求 | 值 |
---|---|
最低受支持的客户端 | Windows XP、Windows 2000 Professional [仅限桌面应用] |
最低受支持的服务器 | Windows 2000 Server [仅限桌面应用] |
目标平台 | Windows |
标头 | gdiplusheaders.h (包括 Gdiplus.h) |
Library | Gdiplus.lib |
DLL | Gdiplus.dll |