Skip to content

Commit

Permalink
SkParagraph: support multiple default font families (flutter#24662)
Browse files Browse the repository at this point in the history
  • Loading branch information
jason-simmons authored Mar 4, 2021
1 parent 7a726f4 commit e06dbeb
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion third_party/txt/src/txt/font_collection.cc
Original file line number Diff line number Diff line change
Expand Up @@ -393,8 +393,12 @@ FontCollection::CreateSktFontCollection() {
if (!skt_collection_) {
skt_collection_ = sk_make_sp<skia::textlayout::FontCollection>();

std::vector<SkString> default_font_families;
for (const std::string& family : GetDefaultFontFamilies()) {
default_font_families.emplace_back(family);
}
skt_collection_->setDefaultFontManager(default_font_manager_,
GetDefaultFontFamilies()[0].c_str());
default_font_families);
skt_collection_->setAssetFontManager(asset_font_manager_);
skt_collection_->setDynamicFontManager(dynamic_font_manager_);
skt_collection_->setTestFontManager(test_font_manager_);
Expand Down

0 comments on commit e06dbeb

Please sign in to comment.