Module: wine Branch: master Commit: 0c06ec1bb300a52ad12226e0105c764e733914c6 URL: http://source.winehq.org/git/?p=wine.git;a=commit;h=0c06ec1bb300a52ad12226e0...
Author: Huw Davies huw@codeweavers.com Date: Wed Sep 20 12:43:10 2006 +0100
gdi32: Only run the GetGlyphIndices test if Symbol is installed.
---
dlls/gdi/tests/font.c | 23 +++++++++++++++++++++++ 1 files changed, 23 insertions(+), 0 deletions(-)
diff --git a/dlls/gdi/tests/font.c b/dlls/gdi/tests/font.c index 699d9b2..57d097b 100644 --- a/dlls/gdi/tests/font.c +++ b/dlls/gdi/tests/font.c @@ -29,6 +29,23 @@ #include "winuser.h"
#include "wine/test.h"
+static INT CALLBACK is_font_installed_proc(const LOGFONT *elf, const TEXTMETRIC *ntm, DWORD type, LPARAM lParam) +{ + return 0; +} + +static BOOL is_font_installed(const char *name) +{ + HDC hdc = GetDC(0); + BOOL ret = FALSE; + + if(!EnumFontFamiliesA(hdc, name, is_font_installed_proc, 0)) + ret = TRUE; + + ReleaseDC(0, hdc); + return ret; +} + static void check_font(const char* test, const LOGFONTA* lf, HFONT hfont) { LOGFONTA getobj_lf; @@ -410,6 +427,12 @@ static void test_GetGlyphIndices() return; }
+ if(!is_font_installed("Symbol")) + { + trace("Symbol is not installed so skipping this test\n"); + return; + } + memset(&lf, 0, sizeof(lf)); strcpy(lf.lfFaceName, "Symbol"); lf.lfHeight = 20;