From 58262318709811eac5ff58d1776c7fc05709dd62 Mon Sep 17 00:00:00 2001 From: fsfksjfjse <145445903+fsfksjfjse@users.noreply.github.com> Date: Tue, 3 Nov 2026 03:39:34 +0800 Subject: [PATCH] Add cheat names to the font atlas glyph ranges --- runtime/ui/menu.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/runtime/ui/menu.cpp b/runtime/ui/menu.cpp index a4a6e33d..35b65311 100644 --- a/runtime/ui/menu.cpp +++ b/runtime/ui/menu.cpp @@ -346,6 +346,10 @@ static int fonts_up(float scale) { ImFontGlyphRangesBuilder b; b.AddText(ui_text_in("en", kCjk[i].name)); ui_text_visit(kCjk[i].lang, add_row_glyphs, &b); + // Cheat names come from a mod's cheats/.txt at runtime, so no catalog row holds them + // and their glyphs would otherwise fall back to the missing-glyph box. + for (int k = 0; k < cheats_count(); k++) + if (const CheatInfo *ci = cheats_info(k); ci && ci->name) b.AddText(ci->name); b.BuildRanges(&ranges[i]); ImFontConfig mc; mc.MergeMode = true;