mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
bug 785291 - Add support to load fonts from an APK, search for fonts in res/fonts r=jfkthame
This commit is contained in:
parent
8be661e839
commit
8e39cb742a
@ -944,9 +944,9 @@ gfxFT2FontList::FindFonts()
|
||||
NS_RUNTIMEABORT("Could not read the system fonts directory");
|
||||
}
|
||||
|
||||
// look for locally-added fonts in the profile
|
||||
// look for fonts shipped with the product
|
||||
nsCOMPtr<nsIFile> localDir;
|
||||
nsresult rv = NS_GetSpecialDirectory(NS_APP_USER_PROFILE_LOCAL_50_DIR,
|
||||
nsresult rv = NS_GetSpecialDirectory(NS_APP_RES_DIR,
|
||||
getter_AddRefs(localDir));
|
||||
if (NS_SUCCEEDED(rv)) {
|
||||
nsCString localPath;
|
||||
@ -956,6 +956,17 @@ gfxFT2FontList::FindFonts()
|
||||
}
|
||||
}
|
||||
|
||||
// look for locally-added fonts in the profile
|
||||
rv = NS_GetSpecialDirectory(NS_APP_USER_PROFILE_LOCAL_50_DIR,
|
||||
getter_AddRefs(localDir));
|
||||
if (NS_SUCCEEDED(rv)) {
|
||||
nsCString localPath;
|
||||
rv = localDir->GetNativePath(localPath);
|
||||
if (NS_SUCCEEDED(rv)) {
|
||||
FindFontsInDir(localPath, &fnc);
|
||||
}
|
||||
}
|
||||
|
||||
// Finalize the families by sorting faces into standard order
|
||||
// and marking "simple" families.
|
||||
// Passing non-null userData here says that we want faces to be sorted.
|
||||
|
Loading…
Reference in New Issue
Block a user