From 531219f84d0d6fa236283e5c3d061b5f752df793 Mon Sep 17 00:00:00 2001 From: Vincent Povirk Date: Thu, 15 Apr 2010 11:49:20 -0500 Subject: [PATCH] gdiplus: Do not create FontFamilies for bitmap fonts. --- dlls/gdiplus/font.c | 5 ++++- dlls/gdiplus/tests/font.c | 3 --- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/dlls/gdiplus/font.c b/dlls/gdiplus/font.c index 0b7f9f61b07..3a29771c710 100644 --- a/dlls/gdiplus/font.c +++ b/dlls/gdiplus/font.c @@ -521,7 +521,7 @@ GpStatus WINGDIPAPI GdipGetFontHeightGivenDPI(GDIPCONST GpFont *font, REAL dpi, static INT CALLBACK is_font_installed_proc(const LOGFONTW *elf, const TEXTMETRICW *ntm, DWORD type, LPARAM lParam) { - if (!ntm) + if (!ntm || type == RASTER_FONTTYPE) { return 1; } @@ -966,6 +966,9 @@ static INT CALLBACK add_font_proc(const LOGFONTW *lfw, const TEXTMETRICW *ntm, GpFontCollection* fonts = (GpFontCollection*)lParam; int i; + if (type == RASTER_FONTTYPE) + return 1; + /* skip duplicates */ for (i=0; icount; i++) if (strcmpiW(lfw->lfFaceName, fonts->FontFamilies[i]->FamilyName) == 0) diff --git a/dlls/gdiplus/tests/font.c b/dlls/gdiplus/tests/font.c index 1bf2c1e307a..80f11bc0032 100644 --- a/dlls/gdiplus/tests/font.c +++ b/dlls/gdiplus/tests/font.c @@ -192,12 +192,9 @@ static void test_fontfamily (void) expect (FontFamilyNotFound, stat); /* Bitmap fonts are not found */ -todo_wine -{ stat = GdipCreateFontFamilyFromName (MSSansSerif, NULL, &family); expect (FontFamilyNotFound, stat); if(stat == Ok) GdipDeleteFontFamily(family); -} stat = GdipCreateFontFamilyFromName (arial, NULL, &family); if(stat == FontFamilyNotFound) -- 2.11.4.GIT