IMLangFontLink::MapFont method

Creates a font to output the characters from the given set of code pages.

Syntax

HRESULT MapFont(
  [in]  HDC   hDC,
  [in]  DWORD dwCodePages,
  [in]  HFONT hSrcFont,
  [out] HFONT *phDestFont
);

Parameters

  • hDC [in]
    A handle to a device context.

  • dwCodePages [in]
    An unsigned long integer value that specifies the source set of code pages.

  • hSrcFont [in]
    A handle to the source font object from which phDestFont is inherited.

  • phDestFont [out]
    A pointer to a font object where the created font is returned.

Return value

Returns S_OK if successful, or an error value otherwise.

Remarks

MLang implements a font cache to store the custom fonts created by this method. When a client has finished using a font created by IMLangFontLink::MapFont, it should call IMLangFontLink::ReleaseFont to remove the font object from the cache.

Requirements

Minimum supported client

Windows XP

Minimum supported server

Windows 2000 Server

Header

Mlang.h

IDL

Mlang.idl

DLL

Mlang.dll

See also

IMLangFontLink

IMLangFontLink::ResetFontMapping