mirror of
https://github.com/reactos/wine.git
synced 2024-11-24 04:10:04 +00:00
dwrite/tests: A couple of tests for matching with invalid font properties.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
0973f4655a
commit
02773e1f15
@ -2970,6 +2970,20 @@ static void test_GetFirstMatchingFont(void)
|
||||
IDWriteFont_Release(font);
|
||||
IDWriteFont_Release(font2);
|
||||
|
||||
/* out-of-range font props are allowed */
|
||||
hr = IDWriteFontFamily_GetFirstMatchingFont(family, 1000, DWRITE_FONT_STRETCH_NORMAL, DWRITE_FONT_STYLE_NORMAL, &font);
|
||||
ok(hr == S_OK, "got 0x%08x\n", hr);
|
||||
IDWriteFont_Release(font);
|
||||
|
||||
hr = IDWriteFontFamily_GetFirstMatchingFont(family, DWRITE_FONT_WEIGHT_NORMAL, 10, DWRITE_FONT_STYLE_NORMAL, &font);
|
||||
ok(hr == S_OK, "got 0x%08x\n", hr);
|
||||
IDWriteFont_Release(font);
|
||||
|
||||
hr = IDWriteFontFamily_GetFirstMatchingFont(family, DWRITE_FONT_WEIGHT_NORMAL, DWRITE_FONT_STRETCH_NORMAL,
|
||||
10, &font);
|
||||
ok(hr == S_OK, "got 0x%08x\n", hr);
|
||||
IDWriteFont_Release(font);
|
||||
|
||||
IDWriteFontFamily_Release(family);
|
||||
|
||||
font = get_tahoma_instance(factory, DWRITE_FONT_STYLE_ITALIC);
|
||||
@ -2998,6 +3012,22 @@ static void test_GetMatchingFonts(void)
|
||||
hr = IDWriteFontCollection_GetFontFamily(collection, 0, &family);
|
||||
ok(hr == S_OK, "got 0x%08x\n", hr);
|
||||
|
||||
/* out-of-range font props are allowed */
|
||||
hr = IDWriteFontFamily_GetMatchingFonts(family, 1000, DWRITE_FONT_STRETCH_NORMAL,
|
||||
DWRITE_FONT_STYLE_NORMAL, &fontlist);
|
||||
ok(hr == S_OK, "got 0x%08x\n", hr);
|
||||
IDWriteFontList_Release(fontlist);
|
||||
|
||||
hr = IDWriteFontFamily_GetMatchingFonts(family, DWRITE_FONT_WEIGHT_NORMAL, 10,
|
||||
DWRITE_FONT_STYLE_NORMAL, &fontlist);
|
||||
ok(hr == S_OK, "got 0x%08x\n", hr);
|
||||
IDWriteFontList_Release(fontlist);
|
||||
|
||||
hr = IDWriteFontFamily_GetMatchingFonts(family, DWRITE_FONT_WEIGHT_NORMAL, DWRITE_FONT_STRETCH_NORMAL,
|
||||
10, &fontlist);
|
||||
ok(hr == S_OK, "got 0x%08x\n", hr);
|
||||
IDWriteFontList_Release(fontlist);
|
||||
|
||||
hr = IDWriteFontFamily_GetMatchingFonts(family, DWRITE_FONT_WEIGHT_NORMAL,
|
||||
DWRITE_FONT_STRETCH_NORMAL, DWRITE_FONT_STYLE_NORMAL, &fontlist);
|
||||
ok(hr == S_OK, "got 0x%08x\n", hr);
|
||||
|
Loading…
Reference in New Issue
Block a user