ComponentOne Bitmap for WinForms
C1.Win.C1DX.4.8 Assembly / C1.Util.DX.DirectWrite Namespace / Factory Class / RegisterFontCollectionLoader Method
Reference to a FontCollectionLoader object to be registered.

In This Topic
    RegisterFontCollectionLoader Method
    In This Topic
    Registers a custom font collection loader with the factory object.
    Syntax
    'Declaration
     
    Public Sub RegisterFontCollectionLoader( _
       ByVal fontCollectionLoader As FontCollectionLoader _
    ) 
    public void RegisterFontCollectionLoader( 
       FontCollectionLoader fontCollectionLoader
    )

    Parameters

    fontCollectionLoader
    Reference to a FontCollectionLoader object to be registered.

    Return Value

    If the 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 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.
    See Also