Home COM GDI+ WebBrowser Data Access

IMLangFontLink2  Interface

 

IID_IMLangFontLink2

{DCCFC162-2B38-11d2-B7EC-00C04F8F5D9A}

 

 

Like the IMLangFontLink interface, this interface implements a set of services that enable an application to use font linking.

 

Remarks

This interface enables an application to utilize font linking. Font linking is a term used to describe the process of automatic font switching based on the character code values of the text stream to be rendered. For example, characters for Hebrew and Japanese are not likely included in a single font. The services provided by this interface would allow a client to switch between a Hebrew font and a Japanese font to output a string containing characters from both languages. IMLangFontLink does this by creating custom fonts and providing an underlying font cache in the implementation.

 

 

Methods in VTable order

IUnknown Methods

Description

QueryInterface

Returns pointers to supported interfaces.

AddRef

Increments reference count.

Release

Decrements reference count.

IMLangCodePages Methods

Description

GetCharCodePages

Retrieves the set of code pages to which the given Unicode character belongs.

GetStrCodePages

Retrieves the set of code pages to which the Unicode characters in the given string belong.

CodePageToCodePages

Translates the given code page identifier value into the corresponding entry in a set of code pages.

CodePagesToCodePage

Retrieves the identifier value for a code page in the given set of code pages.

IMLangFontLink2 Methods

Description

GetFontCodePages

Retrieves the set of code pages whose characters can be output by the given font on the given device context.

ReleaseFont

Releases a font object created by the IMLangFontLink2::MapFont method.

ResetFontMapping

Clears the font cache that is used to store fonts created by IMLangFontLink2::MapFont.

MapFont

Creates a font to output the characters from the given set of code pages or to output a character not found in a codepage.

GetFontUnicodeRanges

Retrieves information about which Unicode characters are supported by a font.

GetScriptFontInfo

Retrieves the font information for the specified script.

CodePageToScriptID

Retrieves the script identifier associated with a code page.

 

GetCharCodePages

 

FUNCTION IMLangFontLink2_GetCharCodePages ( _
  BYVAL pthis AS DWORD PTR _
, BYVAL chSrc AS DWORD _
, BYREF pdwCodepages AS DWORD _
  ) AS LONG

  LOCAL HRESULT AS LONG

  CALL DWORD @@pthis[3] USING IMLangFontLink2_GetCharCodePages (pthis, chSrc, pdwCodepages) TO HRESULT

  FUNCTION = HRESULT

END FUNCTION

 

 

GetStrCodePages

 

FUNCTION IMLangFontLink2_GetStrCodePages ( _
  BYVAL pthis AS DWORD PTR _
, BYVAL pszSrc AS DWORD _
, BYVAL
cchSrc AS LONG _
, BYVAL
dwPriorityCodePages AS DWORD _
, BYREF pdwCodepages AS DWORD _
, BYREF
pcchCodePages AS DWORD _
  ) AS LONG

  LOCAL HRESULT AS LONG

  CALL DWORD @@pthis[4] USING IMLangFontLink2_GetStrCodePages (pthis, pszSrc, cchSrc, dwPriorityCodePages, pdwCodePages, pcchCodePages) TO HRESULT

  FUNCTION = HRESULT

END FUNCTION

 

 

CodePageToCodePages

 

FUNCTION IMLangFontLink2_CodePageToCodePages ( _
  BYVAL pthis AS DWORD PTR _
, BYVAL uCodePage AS DWORD _
, BYREF pdwCodepages AS DWORD _
  ) AS LONG

  LOCAL HRESULT AS LONG

  CALL DWORD @@pthis[5] USING IMLangFontLink2_CodePageToCodePages (pthis, uCodePage, pdwCodePages) TO HRESULT

  FUNCTION = HRESULT

END FUNCTION

 

 

CodePagesToCodePage

 

FUNCTION IMLangFontLink2_CodePagesToCodePage ( _
  BYVAL pthis AS DWORD PTR _
, BYVAL dwCodePages AS DWORD _
, BYVAL uDefaultCodePage AS DWORD _
, BYREF
puCodePage AS DWORD _
  ) AS LONG

  LOCAL HRESULT AS LONG

  CALL DWORD @@pthis[6] USING IMLangFontLink2_CodePagesToCodePage (pthis, dwCodePages, uDefaultCodePage, puCodePage) TO HRESULT

  FUNCTION = HRESULT

END FUNCTION

 

 

CodePagesToCodePage

 

FUNCTION IMLangFontLink2_GetFontCodePages ( _
  BYVAL pthis AS DWORD PTR _
, BYVAL hDC AS DWORD _
, BYVAL hFont AS DWORD _
, BYREF
pdwCodePages AS DWORD _
  ) AS LONG

  LOCAL HRESULT AS LONG

  CALL DWORD @@pthis[7] USING IMLangFontLink2_GetFontCodePages (pthis, hDC, hFont, pdwCodePages) TO HRESULT

  FUNCTION = HRESULT

END FUNCTION

 

 

ReleaseFont

 

FUNCTION IMLangFontLink2_ReleaseFont ( _
  BYVAL pthis AS DWORD PTR _
, BYVAL hFont AS DWORD _
  ) AS LONG

  LOCAL HRESULT AS LONG

  CALL DWORD @@pthis[8] USING IMLangFontLink2_ReleaseFont (pthis, hFont) TO HRESULT

  FUNCTION = HRESULT

END FUNCTION

 

 

ResetFontMapping

 

FUNCTION IMLangFontLink2_ResetFontMapping ( _
  BYVAL pthis AS DWORD PTR _
  ) AS LONG

  LOCAL HRESULT AS LONG

  CALL DWORD @@pthis[9] USING IMLangFontLink2_ResetFontMapping (pthis) TO HRESULT

  FUNCTION = HRESULT

END FUNCTION

 

 

MapFont

 

FUNCTION IMLangFontLink2_MapFont ( _
  BYVAL pthis AS DWORD PTR _
, BYVAL hDC AS DWORD _
, BYVAL dwCodePages AS DWORD _
, BYVAL
chSrc  AS DWORD _
, BYREF
pFont AS DWORD _
  ) AS LONG

  LOCAL HRESULT AS LONG

  CALL DWORD @@pthis[10] USING IMLangFontLink2_MapFont (pthis, hDC, dwCodePages, chSrc, pFont) TO HRESULT

  FUNCTION = HRESULT

END FUNCTION

 

 

GetFontUnicodeRanges

 

FUNCTION IMLangFontLink2_GetFontUnicodeRanges ( _
  BYVAL pthis AS DWORD PTR _
, BYVAL hDC AS DWORD _
, BYREF
puiRanges AS DWORD _
, BYREF
pUranges AS DWORD _
  ) AS LONG

  LOCAL HRESULT AS LONG

  CALL DWORD @@pthis[11] USING IMLangFontLink2_GetFontUnicodeRanges (pthis, hDC, puiRanges, pUranges) TO HRESULT

  FUNCTION = HRESULT

END FUNCTION

 

 

GetScriptFontInfo

 

FUNCTION IMLangFontLink2_GetScriptFontInfo ( _
  BYVAL pthis AS DWORD PTR _
, BYVAL sid AS BYTE _
, BYVAL dwFlags AS DWORD _
, BYREF puiFonts AS DWORD _
, BYREF pScriptFont AS DWORD _
  ) AS LONG

  LOCAL HRESULT AS LONG

  CALL DWORD @@pthis[12] USING IMLangFontLink2_GetScriptFontInfo (pthis, sid, dwFlags, puiFonts, pScriptFont) TO HRESULT

  FUNCTION = HRESULT

END FUNCTION

 

 

CodePageToScriptID

 

FUNCTION IMLangFontLink2_CodePageToScriptID ( _
  BYVAL pthis AS DWORD PTR _
, BYVAL
uiCodePage AS DWORD _
, BYREF
pSid AS BYTE _
  ) AS LONG

  LOCAL HRESULT AS LONG

  CALL DWORD @@pthis[13] USING IMLangFontLink2_CodePageToScriptID (pthis, hDC, dwCodePages, hSrcFont, phDestFont) TO HRESULT

  FUNCTION = HRESULT

END FUNCTION

 

 

Page last updated on Monday, 03 April 2006 20:01:50 +0200