Commit 6376b4cf authored by Alexandre Julliard's avatar Alexandre Julliard

gdi32: Implement GetGlyphOutline as a standard driver entry point.

parent ff96c4dd
......@@ -2503,6 +2503,7 @@ DWORD WINAPI GetGlyphOutlineW( HDC hdc, UINT uChar, UINT fuFormat,
{
DC *dc;
DWORD ret;
PHYSDEV dev;
TRACE("(%p, %04x, %04x, %p, %d, %p, %p)\n",
hdc, uChar, fuFormat, lpgm, cbBuffer, lpBuffer, lpmat2 );
......@@ -2512,12 +2513,8 @@ DWORD WINAPI GetGlyphOutlineW( HDC hdc, UINT uChar, UINT fuFormat,
dc = get_dc_ptr(hdc);
if(!dc) return GDI_ERROR;
if(dc->gdiFont)
ret = WineEngGetGlyphOutline(dc->gdiFont, uChar, fuFormat, lpgm,
cbBuffer, lpBuffer, lpmat2);
else
ret = GDI_ERROR;
dev = GET_DC_PHYSDEV( dc, pGetGlyphOutline );
ret = dev->funcs->pGetGlyphOutline( dev, uChar, fuFormat, lpgm, cbBuffer, lpBuffer, lpmat2 );
release_dc_ptr( dc );
return ret;
}
......
......@@ -6196,18 +6196,23 @@ end:
}
/*************************************************************
* WineEngGetGlyphOutline
*
* freetype_GetGlyphOutline
*/
DWORD WineEngGetGlyphOutline(GdiFont *font, UINT glyph, UINT format,
LPGLYPHMETRICS lpgm, DWORD buflen, LPVOID buf,
const MAT2* lpmat)
static DWORD freetype_GetGlyphOutline( PHYSDEV dev, UINT glyph, UINT format,
LPGLYPHMETRICS lpgm, DWORD buflen, LPVOID buf, const MAT2 *lpmat )
{
struct freetype_physdev *physdev = get_freetype_dev( dev );
DWORD ret;
if (!physdev->font)
{
dev = GET_NEXT_PHYSDEV( dev, pGetGlyphOutline );
return dev->funcs->pGetGlyphOutline( dev, glyph, format, lpgm, buflen, buf, lpmat );
}
GDI_CheckNotLock();
EnterCriticalSection( &freetype_cs );
ret = get_glyph_outline( font, glyph, format, lpgm, buflen, buf, lpmat );
ret = get_glyph_outline( physdev->font, glyph, format, lpgm, buflen, buf, lpmat );
LeaveCriticalSection( &freetype_cs );
return ret;
}
......@@ -7089,7 +7094,7 @@ static const struct gdi_dc_funcs freetype_funcs =
NULL, /* pGetFontData */
freetype_GetFontUnicodeRanges, /* pGetFontUnicodeRanges */
freetype_GetGlyphIndices, /* pGetGlyphIndices */
NULL, /* pGetGlyphOutline */
freetype_GetGlyphOutline, /* pGetGlyphOutline */
NULL, /* pGetICMProfile */
NULL, /* pGetImage */
NULL, /* pGetKerningPairs */
......@@ -7190,14 +7195,6 @@ BOOL WineEngDestroyFontInstance(HFONT hfont)
return FALSE;
}
DWORD WineEngGetGlyphOutline(GdiFont *font, UINT glyph, UINT format,
LPGLYPHMETRICS lpgm, DWORD buflen, LPVOID buf,
const MAT2* lpmat)
{
ERR("called but we don't have FreeType\n");
return GDI_ERROR;
}
UINT WineEngGetOutlineTextMetrics(GdiFont *font, UINT cbSize,
OUTLINETEXTMETRICW *potm)
{
......
......@@ -293,9 +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 DWORD WineEngGetFontData(GdiFont*, DWORD, DWORD, LPVOID, DWORD) DECLSPEC_HIDDEN;
extern DWORD WineEngGetGlyphOutline(GdiFont*, UINT glyph, UINT format,
LPGLYPHMETRICS, DWORD buflen, LPVOID buf,
const MAT2*) DECLSPEC_HIDDEN;
extern DWORD WineEngGetKerningPairs(GdiFont*, DWORD, KERNINGPAIR *) DECLSPEC_HIDDEN;
extern BOOL WineEngGetLinkedHFont(DC *dc, WCHAR c, HFONT *new_hfont, UINT *glyph) DECLSPEC_HIDDEN;
extern UINT WineEngGetOutlineTextMetrics(GdiFont*, UINT, LPOUTLINETEXTMETRICW) DECLSPEC_HIDDEN;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment