mirror of
https://github.com/flutter/flutter.git
synced 2026-02-20 02:29:02 +08:00
SkParagraph: support multiple default font families (flutter/engine#24662)
This commit is contained in:
parent
08fb23f526
commit
71e7d8e96e
@ -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_);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user