mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
bug 822048 - use a /fonts/ subdir for any locally-added fonts stored in the profile. r=blassey
This commit is contained in:
parent
d44ab31b15
commit
c346f7ddb4
@ -1081,10 +1081,11 @@ gfxFT2FontList::FindFonts()
|
|||||||
}
|
}
|
||||||
|
|
||||||
// look for fonts shipped with the product
|
// look for fonts shipped with the product
|
||||||
|
NS_NAMED_LITERAL_STRING(kFontsDirName, "fonts");
|
||||||
nsCOMPtr<nsIFile> localDir;
|
nsCOMPtr<nsIFile> localDir;
|
||||||
nsresult rv = NS_GetSpecialDirectory(NS_APP_RES_DIR,
|
nsresult rv = NS_GetSpecialDirectory(NS_APP_RES_DIR,
|
||||||
getter_AddRefs(localDir));
|
getter_AddRefs(localDir));
|
||||||
if (NS_SUCCEEDED(rv) && NS_SUCCEEDED(localDir->Append(NS_LITERAL_STRING("fonts")))) {
|
if (NS_SUCCEEDED(rv) && NS_SUCCEEDED(localDir->Append(kFontsDirName))) {
|
||||||
ExtractFontsFromJar(localDir);
|
ExtractFontsFromJar(localDir);
|
||||||
nsCString localPath;
|
nsCString localPath;
|
||||||
rv = localDir->GetNativePath(localPath);
|
rv = localDir->GetNativePath(localPath);
|
||||||
@ -1093,10 +1094,10 @@ gfxFT2FontList::FindFonts()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// look for locally-added fonts in the profile
|
// look for locally-added fonts in a "fonts" subdir of the profile
|
||||||
rv = NS_GetSpecialDirectory(NS_APP_USER_PROFILE_LOCAL_50_DIR,
|
rv = NS_GetSpecialDirectory(NS_APP_USER_PROFILE_LOCAL_50_DIR,
|
||||||
getter_AddRefs(localDir));
|
getter_AddRefs(localDir));
|
||||||
if (NS_SUCCEEDED(rv)) {
|
if (NS_SUCCEEDED(rv) && NS_SUCCEEDED(localDir->Append(kFontsDirName))) {
|
||||||
nsCString localPath;
|
nsCString localPath;
|
||||||
rv = localDir->GetNativePath(localPath);
|
rv = localDir->GetNativePath(localPath);
|
||||||
if (NS_SUCCEEDED(rv)) {
|
if (NS_SUCCEEDED(rv)) {
|
||||||
|
Loading…
Reference in New Issue
Block a user