gdi32: Implement GetTextMetrics as a standard driver entry point.
This commit is contained in:
parent
ca4177997c
commit
20070d0838
|
@ -1222,17 +1222,13 @@ BOOL WINAPI GetTextMetricsA( HDC hdc, TEXTMETRICA *metrics )
|
|||
*/
|
||||
BOOL WINAPI GetTextMetricsW( HDC hdc, TEXTMETRICW *metrics )
|
||||
{
|
||||
PHYSDEV physdev;
|
||||
BOOL ret = FALSE;
|
||||
DC * dc = get_dc_ptr( hdc );
|
||||
if (!dc) return FALSE;
|
||||
|
||||
if (dc->gdiFont)
|
||||
ret = WineEngGetTextMetrics(dc->gdiFont, metrics);
|
||||
else
|
||||
{
|
||||
PHYSDEV physdev = GET_DC_PHYSDEV( dc, pGetTextMetrics );
|
||||
ret = physdev->funcs->pGetTextMetrics( physdev, metrics );
|
||||
}
|
||||
physdev = GET_DC_PHYSDEV( dc, pGetTextMetrics );
|
||||
ret = physdev->funcs->pGetTextMetrics( physdev, metrics );
|
||||
|
||||
if (ret)
|
||||
{
|
||||
|
|
|
@ -6209,16 +6209,22 @@ DWORD WineEngGetGlyphOutline(GdiFont *font, UINT glyph, UINT format,
|
|||
}
|
||||
|
||||
/*************************************************************
|
||||
* WineEngGetTextMetrics
|
||||
*
|
||||
* freetype_GetTextMetrics
|
||||
*/
|
||||
BOOL WineEngGetTextMetrics(GdiFont *font, LPTEXTMETRICW ptm)
|
||||
static BOOL freetype_GetTextMetrics( PHYSDEV dev, TEXTMETRICW *metrics )
|
||||
{
|
||||
struct freetype_physdev *physdev = get_freetype_dev( dev );
|
||||
BOOL ret;
|
||||
|
||||
if (!physdev->font)
|
||||
{
|
||||
dev = GET_NEXT_PHYSDEV( dev, pGetTextMetrics );
|
||||
return dev->funcs->pGetTextMetrics( dev, metrics );
|
||||
}
|
||||
|
||||
GDI_CheckNotLock();
|
||||
EnterCriticalSection( &freetype_cs );
|
||||
ret = get_text_metrics( font, ptm );
|
||||
ret = get_text_metrics( physdev->font, metrics );
|
||||
LeaveCriticalSection( &freetype_cs );
|
||||
return ret;
|
||||
}
|
||||
|
@ -7089,7 +7095,7 @@ static const struct gdi_dc_funcs freetype_funcs =
|
|||
NULL, /* pGetPixelFormat */
|
||||
NULL, /* pGetSystemPaletteEntries */
|
||||
freetype_GetTextExtentExPoint, /* pGetTextExtentExPoint */
|
||||
NULL, /* pGetTextMetrics */
|
||||
freetype_GetTextMetrics, /* pGetTextMetrics */
|
||||
NULL, /* pIntersectClipRect */
|
||||
NULL, /* pInvertRgn */
|
||||
NULL, /* pLineTo */
|
||||
|
@ -7196,12 +7202,6 @@ DWORD WineEngGetGlyphOutline(GdiFont *font, UINT glyph, UINT format,
|
|||
return GDI_ERROR;
|
||||
}
|
||||
|
||||
BOOL WineEngGetTextMetrics(GdiFont *font, LPTEXTMETRICW ptm)
|
||||
{
|
||||
ERR("called but we don't have FreeType\n");
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
UINT WineEngGetOutlineTextMetrics(GdiFont *font, UINT cbSize,
|
||||
OUTLINETEXTMETRICW *potm)
|
||||
{
|
||||
|
|
|
@ -312,7 +312,6 @@ extern UINT WineEngGetOutlineTextMetrics(GdiFont*, UINT, LPOUTLINETEXTMETRICW) D
|
|||
extern UINT WineEngGetTextCharsetInfo(GdiFont *font, LPFONTSIGNATURE fs, DWORD flags) DECLSPEC_HIDDEN;
|
||||
extern BOOL WineEngGetTextExtentExPointI(GdiFont*, const WORD *, INT, INT, LPINT, LPINT, LPSIZE) DECLSPEC_HIDDEN;
|
||||
extern INT WineEngGetTextFace(GdiFont*, INT, LPWSTR) DECLSPEC_HIDDEN;
|
||||
extern BOOL WineEngGetTextMetrics(GdiFont*, LPTEXTMETRICW) DECLSPEC_HIDDEN;
|
||||
extern BOOL WineEngFontIsLinked(GdiFont*) DECLSPEC_HIDDEN;
|
||||
extern BOOL WineEngInit(void) DECLSPEC_HIDDEN;
|
||||
extern BOOL WineEngRealizationInfo(GdiFont*, realization_info_t*) DECLSPEC_HIDDEN;
|
||||
|
|
Loading…
Reference in New Issue