gdi32: Implement FontIsLinked as a standard driver entry point.

This commit is contained in:
Alexandre Julliard 2011-10-21 11:37:48 +02:00
parent e31c51b65e
commit 8796831a9f
3 changed files with 16 additions and 12 deletions

View File

@ -3378,10 +3378,12 @@ DWORD WINAPI GetFontUnicodeRanges(HDC hdc, LPGLYPHSET lpgs)
BOOL WINAPI FontIsLinked(HDC hdc)
{
DC *dc = get_dc_ptr(hdc);
BOOL ret = FALSE;
PHYSDEV dev;
BOOL ret;
if (!dc) return FALSE;
if (dc->gdiFont) ret = WineEngFontIsLinked(dc->gdiFont);
dev = GET_DC_PHYSDEV( dc, pFontIsLinked );
ret = dev->funcs->pFontIsLinked( dev );
release_dc_ptr(dc);
TRACE("returning %d\n", ret);
return ret;

View File

@ -6748,14 +6748,22 @@ static DWORD freetype_GetFontUnicodeRanges( PHYSDEV dev, LPGLYPHSET glyphset )
}
/*************************************************************
* FontIsLinked
* freetype_FontIsLinked
*/
BOOL WineEngFontIsLinked(GdiFont *font)
static BOOL freetype_FontIsLinked( PHYSDEV dev )
{
struct freetype_physdev *physdev = get_freetype_dev( dev );
BOOL ret;
if (!physdev->font)
{
dev = GET_NEXT_PHYSDEV( dev, pFontIsLinked );
return dev->funcs->pFontIsLinked( dev );
}
GDI_CheckNotLock();
EnterCriticalSection( &freetype_cs );
ret = !list_empty(&font->child_fonts);
ret = !list_empty(&physdev->font->child_fonts);
LeaveCriticalSection( &freetype_cs );
return ret;
}
@ -7130,7 +7138,7 @@ static const struct gdi_dc_funcs freetype_funcs =
NULL, /* pFillPath */
NULL, /* pFillRgn */
NULL, /* pFlattenPath */
NULL, /* pFontIsLinked */
freetype_FontIsLinked, /* pFontIsLinked */
NULL, /* pFrameRgn */
NULL, /* pGdiComment */
NULL, /* pGdiRealizationInfo */
@ -7266,11 +7274,6 @@ BOOL WineEngGetLinkedHFont(DC *dc, WCHAR c, HFONT *new_hfont, UINT *glyph)
return FALSE;
}
BOOL WineEngFontIsLinked(GdiFont *font)
{
return FALSE;
}
/*************************************************************************
* GetRasterizerCaps (GDI32.@)
*/

View File

@ -293,7 +293,6 @@ extern INT WineEngAddFontResourceEx(LPCWSTR, DWORD, PVOID) DECLSPEC_HIDDEN;
extern HANDLE WineEngAddFontMemResourceEx(PVOID, DWORD, PVOID, LPDWORD) DECLSPEC_HIDDEN;
extern BOOL WineEngDestroyFontInstance(HFONT handle) DECLSPEC_HIDDEN;
extern BOOL WineEngGetLinkedHFont(DC *dc, WCHAR c, HFONT *new_hfont, UINT *glyph) DECLSPEC_HIDDEN;
extern BOOL WineEngFontIsLinked(GdiFont*) DECLSPEC_HIDDEN;
extern BOOL WineEngInit(void) DECLSPEC_HIDDEN;
extern BOOL WineEngRealizationInfo(GdiFont*, realization_info_t*) DECLSPEC_HIDDEN;
extern BOOL WineEngRemoveFontResourceEx(LPCWSTR, DWORD, PVOID) DECLSPEC_HIDDEN;