gdi32: Improve structure layout of data returned by GetFontRealizationInfo().
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
9cb1981e30
commit
819d36786e
|
@ -783,7 +783,8 @@ struct font_realization_info {
|
|||
DWORD cache_num;
|
||||
DWORD instance_id;
|
||||
DWORD unk;
|
||||
DWORD face_index;
|
||||
WORD face_index;
|
||||
WORD simulations;
|
||||
};
|
||||
|
||||
struct font_fileinfo {
|
||||
|
@ -853,7 +854,8 @@ static HRESULT WINAPI gdiinterop_CreateFontFaceFromHdc(IDWriteGdiInterop *iface,
|
|||
return hr;
|
||||
}
|
||||
|
||||
hr = IDWriteFactory2_CreateFontFace(This->factory, facetype, 1, &file, info.face_index, DWRITE_FONT_SIMULATIONS_NONE,
|
||||
/* Simulations flags values match DWRITE_FONT_SIMULATIONS */
|
||||
hr = IDWriteFactory2_CreateFontFace(This->factory, facetype, 1, &file, info.face_index, info.simulations,
|
||||
fontface);
|
||||
IDWriteFontFile_Release(file);
|
||||
return hr;
|
||||
|
|
|
@ -8282,6 +8282,11 @@ static BOOL freetype_GetFontRealizationInfo( PHYSDEV dev, void *ptr )
|
|||
{
|
||||
info->unk = 0;
|
||||
info->face_index = physdev->font->ft_face->face_index;
|
||||
info->simulations = 0;
|
||||
if (physdev->font->fake_bold)
|
||||
info->simulations |= 0x1;
|
||||
if (physdev->font->fake_italic)
|
||||
info->simulations |= 0x2;
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
|
|
|
@ -284,7 +284,8 @@ struct font_realization_info
|
|||
DWORD cache_num; /* keeps incrementing - num of fonts that have been created allowing for caching?? */
|
||||
DWORD instance_id; /* identifies a realized font instance */
|
||||
DWORD unk; /* unknown */
|
||||
DWORD face_index; /* face index in case of font collections */
|
||||
WORD face_index; /* face index in case of font collections */
|
||||
WORD simulations; /* 0 bit - bold simulation, 1 bit - oblique simulation */
|
||||
};
|
||||
|
||||
extern INT WineEngAddFontResourceEx(LPCWSTR, DWORD, PVOID) DECLSPEC_HIDDEN;
|
||||
|
|
|
@ -4136,7 +4136,8 @@ static void test_RealizationInfo(void)
|
|||
DWORD cache_num;
|
||||
DWORD instance_id;
|
||||
DWORD unk;
|
||||
DWORD face_index;
|
||||
WORD face_index;
|
||||
WORD simulations;
|
||||
};
|
||||
|
||||
struct realization_info_t
|
||||
|
@ -4186,7 +4187,8 @@ static void test_RealizationInfo(void)
|
|||
memset(&lf, 0, sizeof(lf));
|
||||
strcpy(lf.lfFaceName, "Tahoma");
|
||||
lf.lfHeight = 20;
|
||||
lf.lfWeight = FW_NORMAL;
|
||||
lf.lfWeight = FW_BOLD;
|
||||
lf.lfItalic = 1;
|
||||
hfont = CreateFontIndirectA(&lf);
|
||||
hfont_old = SelectObject(hdc, hfont);
|
||||
|
||||
|
@ -4234,6 +4236,7 @@ static void test_RealizationInfo(void)
|
|||
ok(fri->flags == ri->flags, "flags mismatch\n");
|
||||
ok(fri->cache_num == ri->cache_num, "cache_num mismatch\n");
|
||||
ok(fri->instance_id == ri->instance_id, "instance id mismatch\n");
|
||||
ok(fri->simulations == 0x2, "got simulations flags 0x%04x\n", fri->simulations);
|
||||
ok(fri->face_index == 0, "got wrong face index %u\n", fri->face_index);
|
||||
ok(info2[6] == 0xcccccccc, "structure longer than 6 dwords\n");
|
||||
|
||||
|
|
Loading…
Reference in New Issue