Commit 107562fd authored by Nikolay Sivov's avatar Nikolay Sivov Committed by Alexandre Julliard

d3dx10/font: Implement GetTextMetrics().

parent 5e0577c2
......@@ -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)
......
......@@ -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 */
......
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