Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Commit f742514

Browse files
Cache font family lookups that fail to obtain a font collection (#10109)
1 parent 7c17772 commit f742514

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

third_party/txt/src/txt/font_collection.cc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -159,6 +159,7 @@ FontCollection::GetMinikinFontCollectionForFamilies(
159159
}
160160
// Default font family also not found. We fail to get a FontCollection.
161161
if (minikin_families.empty()) {
162+
font_collections_cache_[family_key] = nullptr;
162163
return nullptr;
163164
}
164165
if (enable_font_fallback_) {

0 commit comments

Comments
 (0)