MCPcopy Create free account
hub / github.com/Tencent/tgfx / GetHBFontCache

Function GetHBFontCache

test/src/utils/TextShaper.cpp:144–149  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

142};
143
144static HBLockedFontCache GetHBFontCache() {
145 static auto HBFontCacheMutex = new std::mutex();
146 static auto HBFontLRU = new std::list<uint32_t>();
147 static auto HBFontCache = new std::map<uint32_t, std::shared_ptr<hb_font_t>>();
148 return {HBFontLRU, HBFontCache, HBFontCacheMutex};
149}
150
151static std::shared_ptr<hb_font_t> CreateHBFont(const std::shared_ptr<Typeface>& typeface) {
152 auto cache = GetHBFontCache();

Callers 2

CreateHBFontFunction · 0.85
PurgeCachesMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected