| 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;
|
| +}
|
|
|