fix: Display selected custom font name in Settings

This commit is contained in:
Eunchurn Park 2026-01-18 18:52:30 +09:00
parent 68ce6db291
commit c0057900eb
No known key found for this signature in database
GPG Key ID: 29D94D9C697E3F92

View File

@ -216,6 +216,9 @@ void SettingsActivity::render() const {
valueText = settingsList[i].enumValues[value];
} else if (settingsList[i].type == SettingType::VALUE && settingsList[i].valuePtr != nullptr) {
valueText = std::to_string(SETTINGS.*(settingsList[i].valuePtr));
} else if (settingsList[i].type == SettingType::ACTION && strcmp(settingsList[i].name, "Custom Font") == 0) {
// Show current custom font name or "Default"
valueText = SETTINGS.hasCustomFont() ? SETTINGS.getCustomFontName() : "Default";
}
const auto width = renderer.getTextWidth(UI_10_FONT_ID, valueText.c_str());
renderer.drawText(UI_10_FONT_ID, pageWidth - 20 - width, settingY, valueText.c_str(), i != selectedSettingIndex);