Commit 77c74752 authored by Henri Verbeet's avatar Henri Verbeet Committed by Alexandre Julliard

usp10/tests: Also restore the previous font when the finger print matches in…

usp10/tests: Also restore the previous font when the finger print matches in _find_font_for_range(). Otherwise the subsequent SelectObject() call will set *origFont to *hfont. Signed-off-by: 's avatarHenri Verbeet <hverbeet@codeweavers.com> Signed-off-by: 's avatarAric Stewart <aric@codeweavers.com> Signed-off-by: 's avatarAlexandre Julliard <julliard@winehq.org>
parent 6ca15e9c
......@@ -1289,11 +1289,12 @@ static int _find_font_for_range(HDC hdc, const CHAR *recommended, BYTE range, co
if (*hfont)
{
winetest_trace("using font %s\n",lParam.lf.lfFaceName);
*origFont = SelectObject(hdc,*hfont);
if (fingerprint)
{
WORD output[10];
int i;
*origFont = SelectObject(hdc,*hfont);
if (GetGlyphIndicesW(hdc, fingerprint->check, 10, output, 0) != GDI_ERROR)
{
for (i=0; i < 10; i++)
......@@ -1307,6 +1308,7 @@ static int _find_font_for_range(HDC hdc, const CHAR *recommended, BYTE range, co
}
if (i == 10) rc = 1;
}
SelectObject(hdc, *origFont);
}
else rc = 1;
}
......
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