IDWriteRemoteFontFileLoader::CreateFontFileReferenceFromUrl method (dwrite_3.h)

Creates a font file reference from a URL if the loader supports this capability.

Syntax

HRESULT CreateFontFileReferenceFromUrl(
        IDWriteFactory  *factory,
        WCHAR const     *baseUrl,
  [in]  WCHAR const     *fontFileUrl,
  [out] IDWriteFontFile **fontFile
);

Parameters

factory

Type: IDWriteFactory*

Factory used to create the font file reference.

baseUrl

Type: WCHAR

Optional base URL. The base URL is used to resolve the fontFileUrl if it is relative. For example, the baseUrl might be the URL of the referring document that contained the fontFileUrl.

[in] fontFileUrl

Type: WCHAR

URL of the font resource.

[out] fontFile

Type: IDWriteFontFile**

Receives a pointer to the newly created font file reference.

Return value

Type: HRESULT

This method returns an HRESULT success or error code.

Remarks

If baseUrl is a non-empty string, then baseUrl concatenated with fontFileUrl should form a valid URL, DirectWrite will not supply any additional delimiter.

Requirements

Requirement Value
Target Platform Windows
Header dwrite_3.h
Library Dwrite.lib

See also

Creating a custom font set using known, remote fonts on the Web

IDWriteRemoteFontFileLoader