Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(795)

Unified Diff: src/ports/SkFontMgr_android.cpp

Issue 445143002: Remove Android FontConfigInterface (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Rebase Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/ports/SkFontConfigInterface_android.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/ports/SkFontMgr_android.cpp
diff --git a/src/ports/SkFontMgr_android.cpp b/src/ports/SkFontMgr_android.cpp
index 98ac5dc94f2134221419772239ae4ed18733868d..b03185de63687beddcedf805703c705f679c2e6c 100644
--- a/src/ports/SkFontMgr_android.cpp
+++ b/src/ports/SkFontMgr_android.cpp
@@ -34,6 +34,11 @@
# define DEBUG_FONT(args)
#endif
+// For test only.
+static const char* gTestMainConfigFile = NULL;
+static const char* gTestFallbackConfigFile = NULL;
+static const char* gTestFontFilePrefix = NULL;
+
class SkTypeface_Android : public SkTypeface_FreeType {
public:
SkTypeface_Android(int index,
@@ -511,3 +516,22 @@ SkFontMgr* SkFontMgr::Factory() {
return SkNEW(SkFontMgr_Android);
}
+
+void SkUseTestFontConfigFile(const char* mainconf, const char* fallbackconf,
+ const char* fontsdir) {
+ gTestMainConfigFile = mainconf;
+ gTestFallbackConfigFile = fallbackconf;
+ gTestFontFilePrefix = fontsdir;
+ SkASSERT(gTestMainConfigFile);
+ SkASSERT(gTestFallbackConfigFile);
+ SkASSERT(gTestFontFilePrefix);
+ SkDEBUGF(("Use Test Config File Main %s, Fallback %s, Font Dir %s",
+ gTestMainConfigFile, gTestFallbackConfigFile, gTestFontFilePrefix));
+}
+
+void SkGetTestFontConfiguration(const char** mainconf, const char** fallbackconf,
+ const char** fontsdir) {
+ *mainconf = gTestMainConfigFile;
+ *fallbackconf = gTestFallbackConfigFile;
+ *fontsdir = gTestFontFilePrefix;
+}
« no previous file with comments | « src/ports/SkFontConfigInterface_android.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698