diff options
-rw-r--r-- | include/ports/SkFontMgr_android.h | 7 | ||||
-rw-r--r-- | src/ports/SkFontMgr_android_factory.cpp | 31 |
2 files changed, 0 insertions, 38 deletions
diff --git a/include/ports/SkFontMgr_android.h b/include/ports/SkFontMgr_android.h index 9ed435dc0d..ee73a4b717 100644 --- a/include/ports/SkFontMgr_android.h +++ b/include/ports/SkFontMgr_android.h @@ -12,13 +12,6 @@ class SkFontMgr; -/** - * For test only -- this only affects the default factory. - * Load font config from given xml files, instead of those from Android system. - */ -SK_API void SkUseTestFontConfigFile(const char* mainconf, const char* fallbackconf, - const char* fontsdir); - struct SkFontMgr_Android_CustomFonts { /** When specifying custom fonts, indicates how to use system fonts. */ enum SystemFontUse { diff --git a/src/ports/SkFontMgr_android_factory.cpp b/src/ports/SkFontMgr_android_factory.cpp index 74bcef2de5..281b5b8bb5 100644 --- a/src/ports/SkFontMgr_android_factory.cpp +++ b/src/ports/SkFontMgr_android_factory.cpp @@ -10,42 +10,11 @@ #include "SkFontMgr.h" #include "SkFontMgr_android.h" -// For test only. -static const char* gTestFontsXml = nullptr; -static const char* gTestFallbackFontsXml = nullptr; -static const char* gTestBasePath = nullptr; - -void SkUseTestFontConfigFile(const char* fontsXml, const char* fallbackFontsXml, - const char* basePath) -{ - gTestFontsXml = fontsXml; - gTestFallbackFontsXml = fallbackFontsXml; - gTestBasePath = basePath; - SkASSERT(gTestFontsXml); - SkASSERT(gTestFallbackFontsXml); - SkASSERT(gTestBasePath); - SkDEBUGF(("Test BasePath: %s Fonts: %s FallbackFonts: %s\n", - gTestBasePath, gTestFontsXml, gTestFallbackFontsXml)); -} - #ifdef SK_LEGACY_FONTMGR_FACTORY SkFontMgr* SkFontMgr::Factory() { #else sk_sp<SkFontMgr> SkFontMgr::Factory() { #endif - // These globals exist so that Chromium can override the environment. - // TODO: these globals need to be removed, and Chromium use SkFontMgr_New_Android instead. - if ((gTestFontsXml || gTestFallbackFontsXml) && gTestBasePath) { - SkFontMgr_Android_CustomFonts custom = { - SkFontMgr_Android_CustomFonts::kOnlyCustom, - gTestBasePath, - gTestFontsXml, - gTestFallbackFontsXml, - false /* fIsolated */ - }; - return SkFontMgr_New_Android(&custom); - } - return SkFontMgr_New_Android(nullptr); } |