Export (0) Print
Expand All

IDWriteFactory::RegisterFontFileLoader method

Registers a font file loader with DirectWrite.

Syntax


virtual HRESULT RegisterFontFileLoader(
  IDWriteFontFileLoader * fontFileLoader
) = 0;

Parameters

fontFileLoader

Type: IDWriteFontFileLoader*

Pointer to a IDWriteFontFileLoader object for a particular file resource type.

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 file loader with DirectWrite. The font file loader interface, which should be implemented by a singleton object, handles loading font file resources of a particular type from a 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 unregistraton 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

Minimum supported client

Windows 7, Windows Vista with SP2 and Platform Update for Windows Vista [desktop apps | Windows Store apps]

Minimum supported server

Windows Server 2008 R2, Windows Server 2008 with SP2 and Platform Update for Windows Server 2008 [desktop apps | Windows Store apps]

Minimum supported phone

Windows Phone 8.1 [Windows Phone Silverlight 8.1 and Windows Runtime apps]

Header

Dwrite.h

Library

Dwrite.lib

DLL

Dwrite.dll

See also

IDWriteFactory
Custom Font Sample

 

 

Community Additions

ADD
Show:
© 2014 Microsoft