diff --git a/lib/ui/text/asset_manager_font_provider.cc b/lib/ui/text/asset_manager_font_provider.cc index c1ae48e137f60f1b1aa657bb0a10a9eab9523a19..b07472f7e7292f1aff1b6fc1aac52ef9a03cfdcb 100644 --- a/lib/ui/text/asset_manager_font_provider.cc +++ b/lib/ui/text/asset_manager_font_provider.cc @@ -117,6 +117,8 @@ SkTypeface* AssetManagerFontStyleSet::createTypeface(int i) { // Ownership of the stream is transferred. asset.typeface = SkTypeface::MakeFromStream(std::move(stream)); if (!asset.typeface) { + FML_DLOG(ERROR) << "Unable to load font asset for family: " + << family_name_; return nullptr; } } diff --git a/third_party/txt/src/txt/font_collection.cc b/third_party/txt/src/txt/font_collection.cc index d9b00807a3e74d6878d7e7d732b296c0a558d03a..7c0e4e483054c5f5d5a4a222af0e130ef5e42363 100644 --- a/third_party/txt/src/txt/font_collection.cc +++ b/third_party/txt/src/txt/font_collection.cc @@ -295,6 +295,10 @@ std::shared_ptr FontCollection::CreateMinikinFontFamily( } } + if (skia_typefaces.empty()) { + return nullptr; + } + SortSkTypefaces(skia_typefaces); std::vector minikin_fonts;