gdi32: Compare full name before discarding faces.

Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Rémi Bernon 2020-09-07 15:18:59 +02:00 committed by Alexandre Julliard
parent 68ad3162f0
commit 74357b7d97
2 changed files with 1 additions and 4 deletions

View File

@ -1521,7 +1521,7 @@ static WCHAR *ft_face_get_full_name( FT_Face ft_face, LANGID langid )
static inline BOOL faces_equal( const Face *f1, const Face *f2 )
{
if (strcmpiW( f1->style_name, f2->style_name )) return FALSE;
if (strcmpiW( f1->full_name, f2->full_name )) return FALSE;
if (f1->scalable) return TRUE;
if (f1->size.y_ppem != f2->size.y_ppem) return FALSE;
return !memcmp( &f1->fs, &f2->fs, sizeof(f1->fs) );

View File

@ -6984,13 +6984,11 @@ static void test_ttf_names(void)
strcpy(font.lfFaceName, "Wine TTF Names Long Family1 Ext");
memset(&efnd, 0, sizeof(efnd));
EnumFontFamiliesExA(dc, &font, enum_fullname_data_proc, (LPARAM)&efnd, 0);
todo_wine
ok(efnd.total == 2, "EnumFontFamiliesExA found %d fonts, expected 2.\n", efnd.total);
strcpy(font.lfFaceName, "Wine TTF Names Long Family1 Con");
memset(&efnd, 0, sizeof(efnd));
EnumFontFamiliesExA(dc, &font, enum_fullname_data_proc, (LPARAM)&efnd, 0);
todo_wine
ok(efnd.total == 2, "EnumFontFamiliesExA found %d fonts, expected 2.\n", efnd.total);
handle_font = CreateFontIndirectA(&font);
@ -6998,7 +6996,6 @@ static void test_ttf_names(void)
DeleteObject(handle_font);
ret = RemoveFontResourceExA(ttf_name_bold, FR_PRIVATE, 0);
todo_wine
ok(ret, "RemoveFontResourceEx() failed\n");
DeleteFileA(ttf_name_bold);