1 /* 2 * Copyright 2015 Google Inc. 3 * 4 * Use of this source code is governed by a BSD-style license that can be 5 * found in the LICENSE file. 6 */ 7 8 #include "include/core/SkTypes.h" 9 #if defined(SK_BUILD_FOR_WIN) // And !SKIA_GDI? 10 11 #include "include/core/SkFontMgr.h" 12 #include "include/ports/SkTypeface_win.h" 13 #include "src/ports/SkFontMgr_preview.h" 14 15 std::string SkFontMgr::runtimeOS = "OHOS"; 16 SK_API sk_sp<SkFontMgr> SkFontMgr_New_OHOS(const char *path); 17 Factory()18sk_sp<SkFontMgr> SkFontMgr::Factory() { 19 if (SkFontMgr::runtimeOS == "OHOS") { 20 return SkFontMgr_New_OHOS(nullptr); 21 } 22 if (SkFontMgr::runtimeOS == "OHOS_Container") { 23 return SkFontMgr_New_Preview(); 24 } 25 return SkFontMgr_New_DirectWrite(); 26 } 27 28 #endif//defined(SK_BUILD_FOR_WIN) 29