From 8fab9f8a9f90c7d7b36b392144de57d767fc1ab6 Mon Sep 17 00:00:00 2001 From: Augustin Cavalier Date: Fri, 26 Aug 2022 19:32:34 -0400 Subject: [PATCH] Terminal: Assign default font size from system font size. We already used the system font to set the family and style, so do the same for the size as well. Fixes #16176. --- src/apps/terminal/PrefHandler.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/apps/terminal/PrefHandler.cpp b/src/apps/terminal/PrefHandler.cpp index 458f7f33ec..b2f10f5cb0 100644 --- a/src/apps/terminal/PrefHandler.cpp +++ b/src/apps/terminal/PrefHandler.cpp @@ -45,13 +45,11 @@ static const pref_defaults kTermDefaults[] = { { PREF_COLS, "80" }, { PREF_ROWS, "25" }, -// No need for PREF_HALF_FONT_FAMILY/_STYLE defaults here, +// No need for PREF_HALF_FONT_FAMILY/_STYLE/_SIZE defaults here, // these entries will be filled with corresponding params // of the current system fixed font if they are not // available in the settings file - { PREF_HALF_FONT_SIZE, "12" }, - { PREF_TEXT_FORE_COLOR, " 0, 0, 0" }, { PREF_TEXT_BACK_COLOR, "255, 255, 255" }, { PREF_CURSOR_FORE_COLOR, "255, 255, 255" }, @@ -438,6 +436,7 @@ PrefHandler::_ConfirmFont(const BFont *fallbackFont) fallbackFont->GetFamilyAndStyle(&family, &style); setString(PREF_HALF_FONT_FAMILY, family); setString(PREF_HALF_FONT_STYLE, style); + setInt32(PREF_HALF_FONT_SIZE, fallbackFont->Size()); }