gdi32: Implement GetGlyphOutline as a standard driver entry point.
This commit is contained in:
parent
ff96c4dd4e
commit
6376b4cf6f
@ -2503,6 +2503,7 @@ DWORD WINAPI GetGlyphOutlineW( HDC hdc, UINT uChar, UINT fuFormat,
|
|||||||
{
|
{
|
||||||
DC *dc;
|
DC *dc;
|
||||||
DWORD ret;
|
DWORD ret;
|
||||||
|
PHYSDEV dev;
|
||||||
|
|
||||||
TRACE("(%p, %04x, %04x, %p, %d, %p, %p)\n",
|
TRACE("(%p, %04x, %04x, %p, %d, %p, %p)\n",
|
||||||
hdc, uChar, fuFormat, lpgm, cbBuffer, lpBuffer, lpmat2 );
|
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);
|
dc = get_dc_ptr(hdc);
|
||||||
if(!dc) return GDI_ERROR;
|
if(!dc) return GDI_ERROR;
|
||||||
|
|
||||||
if(dc->gdiFont)
|
dev = GET_DC_PHYSDEV( dc, pGetGlyphOutline );
|
||||||
ret = WineEngGetGlyphOutline(dc->gdiFont, uChar, fuFormat, lpgm,
|
ret = dev->funcs->pGetGlyphOutline( dev, uChar, fuFormat, lpgm, cbBuffer, lpBuffer, lpmat2 );
|
||||||
cbBuffer, lpBuffer, lpmat2);
|
|
||||||
else
|
|
||||||
ret = GDI_ERROR;
|
|
||||||
|
|
||||||
release_dc_ptr( dc );
|
release_dc_ptr( dc );
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
@ -6196,18 +6196,23 @@ end:
|
|||||||
}
|
}
|
||||||
|
|
||||||
/*************************************************************
|
/*************************************************************
|
||||||
* WineEngGetGlyphOutline
|
* freetype_GetGlyphOutline
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
DWORD WineEngGetGlyphOutline(GdiFont *font, UINT glyph, UINT format,
|
static DWORD freetype_GetGlyphOutline( PHYSDEV dev, UINT glyph, UINT format,
|
||||||
LPGLYPHMETRICS lpgm, DWORD buflen, LPVOID buf,
|
LPGLYPHMETRICS lpgm, DWORD buflen, LPVOID buf, const MAT2 *lpmat )
|
||||||
const MAT2* lpmat)
|
|
||||||
{
|
{
|
||||||
|
struct freetype_physdev *physdev = get_freetype_dev( dev );
|
||||||
DWORD ret;
|
DWORD ret;
|
||||||
|
|
||||||
|
if (!physdev->font)
|
||||||
|
{
|
||||||
|
dev = GET_NEXT_PHYSDEV( dev, pGetGlyphOutline );
|
||||||
|
return dev->funcs->pGetGlyphOutline( dev, glyph, format, lpgm, buflen, buf, lpmat );
|
||||||
|
}
|
||||||
|
|
||||||
GDI_CheckNotLock();
|
GDI_CheckNotLock();
|
||||||
EnterCriticalSection( &freetype_cs );
|
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 );
|
LeaveCriticalSection( &freetype_cs );
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
@ -7089,7 +7094,7 @@ static const struct gdi_dc_funcs freetype_funcs =
|
|||||||
NULL, /* pGetFontData */
|
NULL, /* pGetFontData */
|
||||||
freetype_GetFontUnicodeRanges, /* pGetFontUnicodeRanges */
|
freetype_GetFontUnicodeRanges, /* pGetFontUnicodeRanges */
|
||||||
freetype_GetGlyphIndices, /* pGetGlyphIndices */
|
freetype_GetGlyphIndices, /* pGetGlyphIndices */
|
||||||
NULL, /* pGetGlyphOutline */
|
freetype_GetGlyphOutline, /* pGetGlyphOutline */
|
||||||
NULL, /* pGetICMProfile */
|
NULL, /* pGetICMProfile */
|
||||||
NULL, /* pGetImage */
|
NULL, /* pGetImage */
|
||||||
NULL, /* pGetKerningPairs */
|
NULL, /* pGetKerningPairs */
|
||||||
@ -7190,14 +7195,6 @@ BOOL WineEngDestroyFontInstance(HFONT hfont)
|
|||||||
return FALSE;
|
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,
|
UINT WineEngGetOutlineTextMetrics(GdiFont *font, UINT cbSize,
|
||||||
OUTLINETEXTMETRICW *potm)
|
OUTLINETEXTMETRICW *potm)
|
||||||
{
|
{
|
||||||
|
@ -293,9 +293,6 @@ extern INT WineEngAddFontResourceEx(LPCWSTR, DWORD, PVOID) DECLSPEC_HIDDEN;
|
|||||||
extern HANDLE WineEngAddFontMemResourceEx(PVOID, DWORD, PVOID, LPDWORD) DECLSPEC_HIDDEN;
|
extern HANDLE WineEngAddFontMemResourceEx(PVOID, DWORD, PVOID, LPDWORD) DECLSPEC_HIDDEN;
|
||||||
extern BOOL WineEngDestroyFontInstance(HFONT handle) DECLSPEC_HIDDEN;
|
extern BOOL WineEngDestroyFontInstance(HFONT handle) DECLSPEC_HIDDEN;
|
||||||
extern DWORD WineEngGetFontData(GdiFont*, DWORD, DWORD, LPVOID, DWORD) 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 DWORD WineEngGetKerningPairs(GdiFont*, DWORD, KERNINGPAIR *) DECLSPEC_HIDDEN;
|
||||||
extern BOOL WineEngGetLinkedHFont(DC *dc, WCHAR c, HFONT *new_hfont, UINT *glyph) DECLSPEC_HIDDEN;
|
extern BOOL WineEngGetLinkedHFont(DC *dc, WCHAR c, HFONT *new_hfont, UINT *glyph) DECLSPEC_HIDDEN;
|
||||||
extern UINT WineEngGetOutlineTextMetrics(GdiFont*, UINT, LPOUTLINETEXTMETRICW) DECLSPEC_HIDDEN;
|
extern UINT WineEngGetOutlineTextMetrics(GdiFont*, UINT, LPOUTLINETEXTMETRICW) DECLSPEC_HIDDEN;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user