Stashing fonts, start font registry.

This commit is contained in:
2025-12-02 17:18:43 -08:00
parent 49fa7ff8a7
commit 09e4cd7ec6
34 changed files with 111742 additions and 28834 deletions

22
fonts/Font.cc Normal file
View File

@@ -0,0 +1,22 @@
#include "Font.h"
#include "imgui.h"
void
Font::Load(const float size) const
{
const ImGuiIO &io = ImGui::GetIO();
io.Fonts->Clear();
const ImFont *font = io.Fonts->AddFontFromMemoryCompressedTTF(
this->data_,
this->size_,
size);
if (!font) {
font = io.Fonts->AddFontDefault();
}
(void) font;
io.Fonts->Build();
}