Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Registers a custom font collection loader with the factory object.
Syntax
HRESULT RegisterFontCollectionLoader(
IDWriteFontCollectionLoader *fontCollectionLoader
);
Parameters
fontCollectionLoader
Type: IDWriteFontCollectionLoader*
Pointer to a IDWriteFontCollectionLoader object to be registered.
Return value
Type: HRESULT
If this method succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.
Remarks
This function registers a font collection loader with DirectWrite. The font collection loader interface, which should be implemented by a singleton object, handles enumerating font files in a font collection given a particular type of key. A given instance can only be registered once. Succeeding attempts will return an error, indicating that it has already been registered. Note that font file loader implementations must not register themselves with DirectWrite inside their constructors, and must not unregister themselves inside their destructors, because registration and unregistration operations increment and decrement the object reference count respectively. Instead, registration and unregistration with DirectWrite of font file loaders should be performed outside of the font file loader implementation.
Requirements
Requirement | Value |
---|---|
Minimum supported client | Windows 7, Windows Vista with SP2 and Platform Update for Windows Vista [desktop apps | UWP apps] |
Minimum supported server | Windows Server 2008 R2, Windows Server 2008 with SP2 and Platform Update for Windows Server 2008 [desktop apps | UWP apps] |
Target Platform | Windows |
Header | dwrite.h |
Library | Dwrite.lib |
DLL | Dwrite.dll |