1 /* 2 * Copyright (c) 2024 Huawei Device Co., Ltd.. All rights reserved. 3 * Licensed under the Apache License, Version 2.0 (the "License"); 4 * you may not use this file except in compliance with the License. 5 * You may obtain a copy of the License at 6 * 7 * http://www.apache.org/licenses/LICENSE-2.0 8 * 9 * Unless required by applicable law or agreed to in writing, software 10 * distributed under the License is distributed on an "AS IS" BASIS, 11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 * See the License for the specific language governing permissions and 13 * limitations under the License. 14 */ 15 16 #include "txt/platform.h" 17 18 #ifndef OHOS_STANDARD_SYSTEM 19 #include "third_party/skia/src/ports/SkFontMgr_ohos.h" 20 #endif 21 22 namespace OHOS { 23 namespace Rosen { 24 namespace SPText { GetDefaultFontFamilies()25std::vector<std::string> GetDefaultFontFamilies() 26 { 27 #ifdef OHOS_STANDARD_SYSTEM 28 return { "OhosThemeFont", "HarmonyOS-Sans" }; 29 #else 30 return { "sans-serif" }; 31 #endif 32 } 33 GetDefaultFontManager()34std::shared_ptr<Drawing::FontMgr> GetDefaultFontManager() 35 { 36 return Drawing::FontMgr::CreateDefaultFontMgr(); 37 } 38 } // namespace SPText 39 } // namespace Rosen 40 } // namespace OHOS 41