From 0e0113723349d42e35eaee6f7838249fce5f3774 Mon Sep 17 00:00:00 2001 From: Jason Simmons Date: Wed, 24 Jul 2019 11:33:04 -0700 Subject: [PATCH] Cache font family lookups that fail to obtain a font collection (flutter/engine#10109) --- engine/src/flutter/third_party/txt/src/txt/font_collection.cc | 1 + 1 file changed, 1 insertion(+) diff --git a/engine/src/flutter/third_party/txt/src/txt/font_collection.cc b/engine/src/flutter/third_party/txt/src/txt/font_collection.cc index dfa554714b..15f2b82439 100644 --- a/engine/src/flutter/third_party/txt/src/txt/font_collection.cc +++ b/engine/src/flutter/third_party/txt/src/txt/font_collection.cc @@ -159,6 +159,7 @@ FontCollection::GetMinikinFontCollectionForFamilies( } // Default font family also not found. We fail to get a FontCollection. if (minikin_families.empty()) { + font_collections_cache_[family_key] = nullptr; return nullptr; } if (enable_font_fallback_) {