diff --git a/gfx/thebes/src/gfxWindowsPlatform.cpp b/gfx/thebes/src/gfxWindowsPlatform.cpp index 4798b9c106e..747c4a2b6a4 100644 --- a/gfx/thebes/src/gfxWindowsPlatform.cpp +++ b/gfx/thebes/src/gfxWindowsPlatform.cpp @@ -280,10 +280,8 @@ void gfxWindowsPlatform::FindFonts() { nsTArray searchPaths(2); - nsTArray fontPatterns(4); - fontPatterns.AppendElement(NS_LITERAL_STRING("\\*.TTF")); + nsTArray fontPatterns(2); fontPatterns.AppendElement(NS_LITERAL_STRING("\\*.ttf")); - fontPatterns.AppendElement(NS_LITERAL_STRING("\\*.OTF")); fontPatterns.AppendElement(NS_LITERAL_STRING("\\*.otf")); wchar_t pathBuf[256]; SHGetSpecialFolderPathW(0, pathBuf, CSIDL_WINDOWS, 0); @@ -296,7 +294,12 @@ gfxWindowsPlatform::FindFonts() for (PRUint32 j = 0; j < fontPatterns.Length(); j++) { nsAutoString pattern(path); pattern.Append(fontPatterns[j]); - HANDLE handle = FindFirstFileW(pattern.get(), &results); + HANDLE handle = FindFirstFileExW(pattern.get(), + FindExInfoStandard, + &results, + FindExSearchNameMatch, + NULL, + 0); PRBool moreFiles = handle != INVALID_HANDLE_VALUE; while (moreFiles) { nsAutoString filePath(path);