IDWriteFontFallbackBuilder::AddMapping method

Appends a single mapping to the list. Call this once for each additional mapping.

Syntax


HRESULT AddMapping(
                       DWRITE_UNICODE_RANGE  *ranges,
                       UINT32                rangesCount,
  [in]           const WCHAR                 **targetFamilyNames,
                       UINT32                targetFamilyNamesCount,
  [in, optional]       IDWriteFontCollection fontCollection = nullptr,
  [in, optional] const WCHAR                 *localeName = nullptr,
  [in, optional] const WCHAR                 *baseFamilyName = nullptr,
                       FLOAT                 scale = 1
);

Parameters

ranges

Type: DWRITE_UNICODE_RANGE*

Unicode ranges that apply to this mapping.

rangesCount

Type: UINT32

Number of Unicode ranges.

targetFamilyNames [in]

Type: const WCHAR**

List of target family name strings.

targetFamilyNamesCount

Type: UINT32

Number of target family names.

fontCollection [in, optional]

Type: IDWriteFontCollection

Optional explicit font collection for this mapping.

localeName [in, optional]

Type: const WCHAR*

Locale of the context.

baseFamilyName [in, optional]

Type: const WCHAR*

Base family name to match against, if applicable.

scale

Type: FLOAT

Scale factor to multiply the result target font by.

Return value

Type: HRESULT

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

Requirements

Minimum supported client

Windows 8.1 [desktop apps | Windows Store apps]

Minimum supported server

Windows Server 2012 R2 [desktop apps | Windows Store apps]

Minimum supported phone

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

Library

Dwrite.lib

DLL

Dwrite.dll

See also

IDWriteFontFallbackBuilder

 

 

Show: