Revert: "Change: Support side-by-side fallback FontCaches instead of hierarchical. (#13303)"

This reverts commit 1829f7926d.
This commit is contained in:
Peter Nelson
2025-12-13 00:29:06 +00:00
committed by dP
parent 766ab3804d
commit 2c528229cb
32 changed files with 480 additions and 783 deletions
+3 -4
View File
@@ -25,16 +25,15 @@ public:
const Sprite *GetGlyph(GlyphID) override { return nullptr; }
uint GetGlyphWidth(GlyphID) override { return this->height / 2; }
bool GetDrawGlyphShadow() override { return false; }
GlyphID MapCharToGlyph(char32_t key) override { return key; }
GlyphID MapCharToGlyph(char32_t key, [[maybe_unused]] bool allow_fallback = true) override { return key; }
std::string GetFontName() override { return "mock"; }
bool IsBuiltInFont() override { return true; }
static void InitializeFontCaches()
{
FontCache::caches.clear();
for (FontSize fs = FS_BEGIN; fs != FS_END; fs++) {
FontCache::Register(std::make_unique<MockFontCache>(fs), FontLoadReason::Default);
FontCache::UpdateCharacterHeight(fs);
if (FontCache::Get(fs) != nullptr) continue;
FontCache::Register(std::make_unique<MockFontCache>(fs));
}
}
};