Home COM GDI+ WebBrowser Data Access

IMLangFontLink  Interface

 

IID_IMLangFontLink

{359F3441-BD4A-11D0-B188-00AA0038C969}

 

 

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.

IMLangFontLink Methods

Description

GetFontCodePages

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

MapFont

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

ReleaseFont

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

ResetFontMapping

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

 

GetCharCodePages

 

FUNCTION IMLangFontLink_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 IMLangFontLink_GetCharCodePages (pthis, chSrc, pdwCodepages) TO HRESULT

  FUNCTION = HRESULT

END FUNCTION

 

 

GetStrCodePages

 

FUNCTION IMLangFontLink_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 IMLangFontLink_GetStrCodePages (pthis, pszSrc, cchSrc, dwPriorityCodePages, pdwCodePages, pcchCodePages) TO HRESULT

  FUNCTION = HRESULT

END FUNCTION

 

 

CodePageToCodePages

 

FUNCTION IMLangFontLink_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 IMLangFontLink_CodePageToCodePages (pthis, uCodePage, pdwCodePages) TO HRESULT

  FUNCTION = HRESULT

END FUNCTION

 

 

CodePagesToCodePage

 

FUNCTION IMLangFontLink_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 IMLangFontLink_CodePagesToCodePage (pthis, dwCodePages, uDefaultCodePage, puCodePage) TO HRESULT

  FUNCTION = HRESULT

END FUNCTION

 

 

CodePagesToCodePage

 

FUNCTION IMLangFontLink_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 IMLangFontLink_GetFontCodePages (pthis, hDC, hFont, pdwCodePages) TO HRESULT

  FUNCTION = HRESULT

END FUNCTION

 

 

MapFont

 

FUNCTION IMLangFontLink_MapFont ( _
  BYVAL pthis AS DWORD PTR _
, BYVAL hDC AS DWORD _
, BYVAL dwCodePages AS DWORD _
, BYVAL
hSrcFont AS DWORD _
, BYREF
phDestFont AS DWORD _
  ) AS LONG

  LOCAL HRESULT AS LONG

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

  FUNCTION = HRESULT

END FUNCTION

 

 

ReleaseFont

 

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

  LOCAL HRESULT AS LONG

  CALL DWORD @@pthis[9] USING IMLangFontLink_ReleaseFont (pthis, hFont) TO HRESULT

  FUNCTION = HRESULT

END FUNCTION

 

 

ResetFontMapping

 

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

  LOCAL HRESULT AS LONG

  CALL DWORD @@pthis[10] USING IMLangFontLink_ResetFontMapping (pthis) TO HRESULT

  FUNCTION = HRESULT

END FUNCTION

 

 

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