Skip to content

Commit

Permalink
Fix font breaking issues (#69)
Browse files Browse the repository at this point in the history
* Allow multiple default fonts for localizations

* Update fallback fonts from tv profile

* Add fonts in wearable and tv emulator

+ adjust azure pipeline
  • Loading branch information
HakkyuKim authored and swift-kim committed Jun 7, 2021
1 parent 83a8062 commit 5552dd5
Show file tree
Hide file tree
Showing 3 changed files with 60 additions and 5 deletions.
2 changes: 0 additions & 2 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,6 @@ jobs:
--target-sysroot `pwd`/tizen_tools/sysroot/$(arch) \
--target-triple $(targetTriple) \
--runtime-mode $(mode) \
--enable-fontconfig \
--embedder-for-target \
--disable-desktop-embeddings \
--build-tizen-shell \
Expand All @@ -83,7 +82,6 @@ jobs:
--target-sysroot `pwd`/tizen_tools/sysroot/$(arch)_40 \
--target-triple $(targetTriple) \
--runtime-mode $(mode) \
--enable-fontconfig \
--embedder-for-target \
--disable-desktop-embeddings \
--build-tizen-shell \
Expand Down
1 change: 0 additions & 1 deletion third_party/txt/src/txt/font_collection.cc
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,6 @@ FontCollection::GetMinikinFontCollectionForFamilies(
FindFontFamilyInManagers(family);
if (minikin_family != nullptr) {
minikin_families.push_back(minikin_family);
break;
}
}
}
Expand Down
62 changes: 60 additions & 2 deletions third_party/txt/src/txt/platform_linux.cc
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,72 @@
namespace txt {

std::vector<std::string> GetDefaultFontFamilies() {
return {"SamsungOneUI", "BreezeSans", "Ubuntu", "Cantarell", "DejaVu Sans", "Liberation Sans", "Arial"};
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",
};
}

sk_sp<SkFontMgr> GetDefaultFontManager() {
#ifdef FLUTTER_USE_FONTCONFIG
return SkFontMgr_New_FontConfig(nullptr);
#else
return SkFontMgr_New_Custom_Directory("/usr/share/fonts/");
return SkFontMgr_New_Custom_Directory("/usr/share/");
#endif
}

Expand Down

0 comments on commit 5552dd5

Please sign in to comment.