Commit 5aa90f37 authored by Huw Davies's avatar Huw Davies Committed by Alexandre Julliard

gdiplus: Skip some tests if certain fonts are not installed.

parent bf89330d
......@@ -53,6 +53,11 @@ static void test_createfont(void)
stat = GdipDeleteFont(font);
expect (InvalidParameter, stat);
stat = GdipCreateFontFamilyFromName(arial, NULL, &fontfamily);
if(stat == FontFamilyNotFound)
{
skip("Arial not installed\n");
return;
}
expect (Ok, stat);
stat = GdipCreateFont(fontfamily, 12, FontStyleRegular, UnitPoint, &font);
expect (Ok, stat);
......@@ -174,6 +179,11 @@ todo_wine
}
stat = GdipCreateFontFamilyFromName (arial, NULL, &family);
if(stat == FontFamilyNotFound)
{
skip("Arial not installed\n");
return;
}
expect (Ok, stat);
stat = GdipGetFamilyName (family, itsName, LANG_NEUTRAL);
......@@ -205,7 +215,11 @@ static void test_fontfamily_properties (void)
GpStatus stat;
UINT16 result = 0;
GdipCreateFontFamilyFromName(arial, NULL, &FontFamily);
stat = GdipCreateFontFamilyFromName(arial, NULL, &FontFamily);
if(stat == FontFamilyNotFound)
skip("Arial not installed\n");
else
{
todo_wine
{
stat = GdipGetLineSpacing(FontFamily, FontStyleRegular, &result);
......@@ -224,8 +238,13 @@ todo_wine
stat = GdipGetCellDescent(FontFamily, FontStyleRegular, &result);
ok(result == 434, "Expected 434, got %d\n", result);
GdipDeleteFontFamily(FontFamily);
}
GdipCreateFontFamilyFromName(TimesNewRoman, NULL, &FontFamily);
stat = GdipCreateFontFamilyFromName(TimesNewRoman, NULL, &FontFamily);
if(stat == FontFamilyNotFound)
skip("Times New Roman not installed\n");
else
{
result = 0;
todo_wine
{
......@@ -245,6 +264,7 @@ todo_wine
stat = GdipGetCellDescent(FontFamily, FontStyleRegular, &result);
ok(result == 443, "Expected 443 got %d\n", result);
GdipDeleteFontFamily(FontFamily);
}
}
static void test_getgenerics (void)
......
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