diff --git a/src/ports/skia_ohos/SkFontMgr_ohos.cpp b/src/ports/skia_ohos/SkFontMgr_ohos.cpp index 2b790edab220916c84729dd79cc23523ab14920e..a8024d5b6709ef0492422118dfd9b386aba194d9 100644 --- a/src/ports/skia_ohos/SkFontMgr_ohos.cpp +++ b/src/ports/skia_ohos/SkFontMgr_ohos.cpp @@ -125,6 +125,13 @@ sk_sp SkFontMgr_OHOS::onMatchFamilyStyleCharacter(const char familyN SkString key = defaultFamily; FallbackSetPos* item = nullptr; if (familyName == nullptr) { + SkString sansFamilyName("HarmonyOS Sans SC"); + bool isFallback = false; + int styleIndex = fontConfig->getStyleIndex(sansFamilyName.c_str(), isFallback); + SkTypeface* retTp = fontConfig->getTypeface(styleIndex, style, isFallback); + if (retTp && retTp->unicharToGlyph(character) != 0) { + return sk_ref_sp(retTp); + } item = fallbackForMap.find(defaultFamily); } else { item = fallbackForMap.find(SkString(familyName));