Signed-off-by: Nikolay Sivov nsivov@codeweavers.com --- dlls/d3dx10_43/font.c | 12 ++++++++---- dlls/d3dx10_43/tests/d3dx10.c | 5 +---- 2 files changed, 9 insertions(+), 8 deletions(-)
diff --git a/dlls/d3dx10_43/font.c b/dlls/d3dx10_43/font.c index d1590c8cc99..2145b1c6f1e 100644 --- a/dlls/d3dx10_43/font.c +++ b/dlls/d3dx10_43/font.c @@ -132,16 +132,20 @@ static HRESULT WINAPI d3dx_font_GetDescW(ID3DX10Font *iface, D3DX10_FONT_DESCW *
static BOOL WINAPI d3dx_font_GetTextMetricsA(ID3DX10Font *iface, TEXTMETRICA *metrics) { - FIXME("iface %p, metrics %p stub!\n", iface, metrics); + struct d3dx_font *font = impl_from_ID3DX10Font(iface); + + TRACE("iface %p, metrics %p.\n", iface, metrics);
- return FALSE; + return GetTextMetricsA(font->hdc, metrics); }
static BOOL WINAPI d3dx_font_GetTextMetricsW(ID3DX10Font *iface, TEXTMETRICW *metrics) { - FIXME("iface %p, metrics %p stub!\n", iface, metrics); + struct d3dx_font *font = impl_from_ID3DX10Font(iface); + + TRACE("iface %p, metrics %p.\n", iface, metrics);
- return FALSE; + return GetTextMetricsW(font->hdc, metrics); }
static HDC WINAPI d3dx_font_GetDC(ID3DX10Font *iface) diff --git a/dlls/d3dx10_43/tests/d3dx10.c b/dlls/d3dx10_43/tests/d3dx10.c index 499d219924d..8c55dd5810b 100644 --- a/dlls/d3dx10_43/tests/d3dx10.c +++ b/dlls/d3dx10_43/tests/d3dx10.c @@ -2206,11 +2206,8 @@ static void test_font(void) ok(ret, "Unexpected ret %#x.\n", ret);
ret = ID3DX10Font_GetTextMetricsA(font, &metrics); -todo_wine ok(ret, "Unexpected ret %#x.\n", ret);
-if (ret) -{ ok(metrics.tmHeight == expmetrics.tmHeight, "Unexpected height %d, expected %d.\n", metrics.tmHeight, expmetrics.tmHeight); ok(metrics.tmAscent == expmetrics.tmAscent, "Unexpected ascent %d, expected %d.\n", @@ -2251,7 +2248,7 @@ if (ret) metrics.tmPitchAndFamily, expmetrics.tmPitchAndFamily); ok(metrics.tmCharSet == expmetrics.tmCharSet, "Unexpected charset %u, expected %u.\n", metrics.tmCharSet, expmetrics.tmCharSet); -} + ID3DX10Font_Release(font);
/* PreloadText */