mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
bug 486624 - AppendFacesFromFontFile is called twice for the same font file r=blassey, vlad
This commit is contained in:
parent
d92725cd1e
commit
36a0869dc8
@ -280,10 +280,8 @@ void
|
||||
gfxWindowsPlatform::FindFonts()
|
||||
{
|
||||
nsTArray<nsString> searchPaths(2);
|
||||
nsTArray<nsString> fontPatterns(4);
|
||||
fontPatterns.AppendElement(NS_LITERAL_STRING("\\*.TTF"));
|
||||
nsTArray<nsString> 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);
|
||||
|
Loading…
Reference in New Issue
Block a user