Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

IDWriteFactory::CreateCustomFontFileReference method

Creates a reference to an application-specific font file resource.

Syntax


virtual HRESULT CreateCustomFontFileReference(
  [in]   const void * fontFileReferenceKey,
  UINT32  fontFileReferenceKeySize,
  IDWriteFontFileLoader * fontFileLoader,
  [out]  IDWriteFontFile ** fontFile
) = 0;

Parameters

fontFileReferenceKey [in]

Type: const void*

A font file reference key that uniquely identifies the font file resource during the lifetime of fontFileLoader.

fontFileReferenceKeySize

Type: UINT32

The size of the font file reference key in bytes.

fontFileLoader

Type: IDWriteFontFileLoader*

The font file loader that will be used by the font system to load data from the file identified by fontFileReferenceKey.

fontFile [out]

Type: IDWriteFontFile**

Contains an address of a pointer to the newly created font file object when this method succeeds, or NULL in case of failure.

Return value

Type: HRESULT

If this method succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.

Remarks

This function is provided for cases when an application or a document needs to use a private font without having to install it on the system. fontFileReferenceKey has to be unique only in the scope of the fontFileLoader used in this call.

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

 

 

Community Additions

Show:
© 2014 Microsoft