diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 7b22e71e87961..5c71ccbb0f4db 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -73,6 +73,7 @@ jobs: --target-sysroot $HOME/tizen_tools/sysroot/$(arch) \ --target-triple $(targetTriple) \ --runtime-mode $(mode) \ + --enable-fontconfig \ --embedder-for-target \ --disable-desktop-embeddings \ --build-tizen-shell diff --git a/third_party/txt/src/txt/font_collection.cc b/third_party/txt/src/txt/font_collection.cc index e7bbe80d03473..8ee809919fefd 100644 --- a/third_party/txt/src/txt/font_collection.cc +++ b/third_party/txt/src/txt/font_collection.cc @@ -99,7 +99,6 @@ size_t FontCollection::GetFontManagersCount() const { void FontCollection::SetupDefaultFontManager() { default_font_manager_ = GetDefaultFontManager(); - fallback_font_manager_ = GetFallbackFontManager(); } void FontCollection::SetDefaultFontManager(sk_sp font_manager) { @@ -145,8 +144,6 @@ std::vector> FontCollection::GetFontManagerOrder() const { order.push_back(test_font_manager_); if (default_font_manager_) order.push_back(default_font_manager_); - if (fallback_font_manager_) - order.push_back(fallback_font_manager_); return order; } @@ -190,6 +187,7 @@ FontCollection::GetMinikinFontCollectionForFamilies( FindFontFamilyInManagers(family); if (minikin_family != nullptr) { minikin_families.push_back(minikin_family); + break; } } } diff --git a/third_party/txt/src/txt/font_collection.h b/third_party/txt/src/txt/font_collection.h index f185c53298d67..315734c74d3da 100644 --- a/third_party/txt/src/txt/font_collection.h +++ b/third_party/txt/src/txt/font_collection.h @@ -91,7 +91,6 @@ class FontCollection : public std::enable_shared_from_this { }; sk_sp default_font_manager_; - sk_sp fallback_font_manager_; sk_sp asset_font_manager_; sk_sp dynamic_font_manager_; sk_sp test_font_manager_; diff --git a/third_party/txt/src/txt/platform.cc b/third_party/txt/src/txt/platform.cc index 689174e8e9431..c60731b3758b5 100644 --- a/third_party/txt/src/txt/platform.cc +++ b/third_party/txt/src/txt/platform.cc @@ -14,8 +14,4 @@ sk_sp GetDefaultFontManager() { return SkFontMgr::RefDefault(); } -sk_sp GetFallbackFontManager() { - return nullptr; -} - } // namespace txt diff --git a/third_party/txt/src/txt/platform.h b/third_party/txt/src/txt/platform.h index 35a33a3d8553c..cffe9280ea5c9 100644 --- a/third_party/txt/src/txt/platform.h +++ b/third_party/txt/src/txt/platform.h @@ -17,8 +17,6 @@ std::vector GetDefaultFontFamilies(); sk_sp GetDefaultFontManager(); -sk_sp GetFallbackFontManager(); - } // namespace txt #endif // TXT_PLATFORM_H_ diff --git a/third_party/txt/src/txt/platform_linux.cc b/third_party/txt/src/txt/platform_linux.cc index 98210dcabe26e..a6fd6c1b72690 100644 --- a/third_party/txt/src/txt/platform_linux.cc +++ b/third_party/txt/src/txt/platform_linux.cc @@ -13,84 +13,14 @@ namespace txt { std::vector GetDefaultFontFamilies() { -#ifdef FLUTTER_USE_FONTCONFIG - return {"TizenDefaultFont"}; -#else - return { - "SamsungOneUI", - "SamsungOneUIArabic", - "SamsungOneUIArmenian", - "SamsungOneUIBangla", - "SamsungOneUIDevanagari", - "SamsungOneUIEthiopic", - "SamsungOneUIFallback", - "SamsungOneUIGeorgian", - "SamsungOneUIGujarati", - "SamsungOneUIGurmukhi", - "SamsungOneUIHebrew", - "SamsungOneUIJP", - "SamsungOneUIKannada", - "SamsungOneUIKhmer", - "SamsungOneUIKorean", - "SamsungOneUIKoreanH", - "SamsungOneUILao", - "SamsungOneUIMalayalam", - "SamsungOneUIMyanmar", - "SamsungOneUIOdia", - "SamsungOneUIOlChiki", - "SamsungOneUISCN", - "SamsungOneUISinhala", - "SamsungOneUITCN", - "SamsungOneUITagalog", - "SamsungOneUITamil", - "SamsungOneUITelugu", - "SamsungOneUIThai", - "SamsungOneFallback", - "SECEmoji", - "BreezeSans", - "BreezeSansArabic", - "BreezeSansArmenian", - "BreezeSansBengali", - "BreezeSansChinese", - "BreezeSansEthiopic", - "BreezeSansGeorgian", - "BreezeSansGujarathi", - "BreezeSansHebrew", - "BreezeSansHindi", - "BreezeSansJapanese", - "BreezeSansKannada", - "BreezeSansKhmer", - "BreezeSansKorean", - "BreezeSansLao", - "BreezeSansMalayalam", - "BreezeSansMeeteiMayek", - "BreezeSansMyanmar", - "BreezeSansOriya", - "BreezeSansPunjabi", - "BreezeSansSinhala", - "BreezeSansTamilBreezeSansTamil", - "BreezeSansTelugu", - "BreezeSansThai", - "BreezeSansTibetan", - "BreezeSansFallback", - "BreezeColorEmoji", - }; -#endif + return {"TizenDefaultFont", "SamsungOneUI"}; } sk_sp GetDefaultFontManager() { #ifdef FLUTTER_USE_FONTCONFIG return SkFontMgr::RefDefault(); #else - return SkFontMgr_New_Custom_Directory("/usr/share/fonts"); -#endif -} - -sk_sp GetFallbackFontManager() { -#ifdef FLUTTER_USE_FONTCONFIG - return nullptr; -#else - return SkFontMgr_New_Custom_Directory("/usr/share/fallback_fonts"); + return SkFontMgr_New_Custom_Directory("/usr/share/fonts/"); #endif }