From 92a171c3e059eda078e43282dae1a59146110539 Mon Sep 17 00:00:00 2001 From: merni-ns <66267867+merni-ns@users.noreply.github.com> Date: Mon, 1 Apr 2024 22:25:44 +0530 Subject: [PATCH] Doc: Improve the output and documentation of the font command. (#12392) Now that the default font =/= sprite font, there is a different way to invoke the sprite font, and default size applies to default (not sprite). Also, interface scaling now affects the font size. --- src/console_cmds.cpp | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/src/console_cmds.cpp b/src/console_cmds.cpp index ad940cd425..8ece62b2f8 100644 --- a/src/console_cmds.cpp +++ b/src/console_cmds.cpp @@ -2179,10 +2179,14 @@ DEF_CONSOLE_CMD(ConFont) IConsolePrint(CC_HELP, "Manage the fonts configuration."); IConsolePrint(CC_HELP, "Usage 'font'."); IConsolePrint(CC_HELP, " Print out the fonts configuration."); - IConsolePrint(CC_HELP, "Usage 'font [medium|small|large|mono] [] [] [aa|noaa]'."); + IConsolePrint(CC_HELP, " The \"Currently active\" configuration is the one actually in effect (after interface scaling and replacing unavailable fonts)."); + IConsolePrint(CC_HELP, " The \"Requested\" configuration is the one requested via console command or config file."); + IConsolePrint(CC_HELP, "Usage 'font [medium|small|large|mono] [] [] [aa|noaa]'."); IConsolePrint(CC_HELP, " Change the configuration for a font."); IConsolePrint(CC_HELP, " Omitting an argument will keep the current value."); - IConsolePrint(CC_HELP, " Set to \"\" for the sprite font (size and aa have no effect on sprite font)."); + IConsolePrint(CC_HELP, " Set to \"\" for the default font. Note that and aa/noaa have no effect if the default font is in use, and fixed defaults are used instead."); + IConsolePrint(CC_HELP, " If the sprite font is enabled in Game Options, it is used instead of the default font."); + IConsolePrint(CC_HELP, " The is automatically multiplied by the current interface scaling."); return true; } @@ -2240,7 +2244,9 @@ DEF_CONSOLE_CMD(ConFont) InitFontCache(fs == FS_MONO); fc = FontCache::Get(fs); } - IConsolePrint(CC_DEFAULT, "{}: \"{}\" {} {} [\"{}\" {} {}]", FontSizeToName(fs), fc->GetFontName(), fc->GetFontSize(), GetFontAAState(fs) ? "aa" : "noaa", setting->font, setting->size, setting->aa ? "aa" : "noaa"); + IConsolePrint(CC_DEFAULT, "{} font:", FontSizeToName(fs)); + IConsolePrint(CC_DEFAULT, "Currently active: \"{}\", size {}, {}", fc->GetFontName(), fc->GetFontSize(), GetFontAAState(fs) ? "aa" : "noaa"); + IConsolePrint(CC_DEFAULT, "Requested: \"{}\", size {}, {}", setting->font, setting->size, setting->aa ? "aa" : "noaa"); } return true;