PrivateFontCollection::AddMemoryFont method (gdiplusheaders.h)
The PrivateFontCollection::AddMemoryFont method adds a font that is contained in system memory to a Windows GDI+ font collection.
Syntax
Status AddMemoryFont(
[in] const VOID *memory,
[in] INT length
);
Parameters
[in] memory
Type: const VOID*
Pointer to a font that is contained in memory.
[in] length
Type: INT
Integer that specifies the number of bytes of data in the font.
Return value
Type: Status
If the method succeeds, it returns Ok, which is an element of the Status enumeration.
If the method fails, it returns one of the other elements of the Status enumeration.
Remarks
When you use the GDI+ API, you must never allow your application to download arbitrary fonts from untrusted sources. The operating system requires elevated privileges to assure that all installed fonts are trusted.
Requirements
Requirement | Value |
---|---|
Minimum supported client | Windows XP, Windows 2000 Professional [desktop apps only] |
Minimum supported server | Windows 2000 Server [desktop apps only] |
Target Platform | Windows |
Header | gdiplusheaders.h (include Gdiplus.h) |
Library | Gdiplus.lib |
DLL | Gdiplus.dll |
See also
Creating a Private Font Collection