[2/2] comdlg32: If CF_NOVERTFONTS is set, ignore fonts whose name start with '@'.

Kusanagi Kouichi slash at ac.auone-net.jp
Thu Dec 29 06:49:27 CST 2011


Signed-off-by: Kusanagi Kouichi <slash at ac.auone-net.jp>
---
 dlls/comdlg32/fontdlg.c       |    7 +++++--
 dlls/comdlg32/tests/fontdlg.c |    1 -
 2 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/dlls/comdlg32/fontdlg.c b/dlls/comdlg32/fontdlg.c
index 8068e82..4f5e4e3 100644
--- a/dlls/comdlg32/fontdlg.c
+++ b/dlls/comdlg32/fontdlg.c
@@ -221,7 +221,7 @@ BOOL WINAPI ChooseFontW(LPCHOOSEFONTW lpChFont)
     if (TRACE_ON(commdlg))
         _dump_cf_flags(lpChFont->Flags);
 
-    if (lpChFont->Flags & (CF_SELECTSCRIPT | CF_NOVERTFONTS ))
+    if (lpChFont->Flags & CF_SELECTSCRIPT)
         FIXME(": unimplemented flag (ignored)\n");
 
     return DialogBoxIndirectParamW(COMDLG32_hInstance, template,
@@ -274,7 +274,7 @@ BOOL WINAPI ChooseFontA(LPCHOOSEFONTA lpChFont)
     }
     if (TRACE_ON(commdlg))
         _dump_cf_flags(lpChFont->Flags);
-    if (lpChFont->Flags & (CF_SELECTSCRIPT | CF_NOVERTFONTS ))
+    if (lpChFont->Flags & CF_SELECTSCRIPT)
         FIXME(": unimplemented flag (ignored)\n");
 
     return DialogBoxIndirectParamA(COMDLG32_hInstance, template,
@@ -325,6 +325,9 @@ static INT AddFontFamily(const ENUMLOGFONTEXW *lpElfex, const NEWTEXTMETRICEXW *
     if (lpcf->Flags & CF_TTONLY)
         if (!(nFontType & TRUETYPE_FONTTYPE))
             return 1;
+    if (lpcf->Flags & CF_NOVERTFONTS &&
+        lpElfex->elfLogFont.lfFaceName[0] == '@')
+        return 1;
 
     if (e) e->added++;
 
diff --git a/dlls/comdlg32/tests/fontdlg.c b/dlls/comdlg32/tests/fontdlg.c
index c16fcf3..86b5aa4 100644
--- a/dlls/comdlg32/tests/fontdlg.c
+++ b/dlls/comdlg32/tests/fontdlg.c
@@ -74,7 +74,6 @@ static INT CALLBACK novert_proc(const LOGFONTA *elf, const TEXTMETRIC *ntm, DWOR
     const LRESULT ret = SendMessage((HWND)lparam, CB_FINDSTRINGEXACT, -1, (LPARAM)elf->lfFaceName);
 
     if (elf->lfFaceName[0] == '@')
-        todo_wine
         ok(ret == CB_ERR, "%s is listed\n", elf->lfFaceName);
     else
         ok(ret != CB_ERR, "%s is not listed\n", elf->lfFaceName);
-- 
1.7.7.3




More information about the wine-patches mailing list