From 3494c701ee6d6d9928cae49cd34082adc73848ce Mon Sep 17 00:00:00 2001
From: Christoph Oelckers <coelckers@users.noreply.github.com>
Date: Tue, 4 Jan 2022 16:39:23 +0100
Subject: [PATCH] - Nam/WW2GI: use the console font for the generic message
 display.

The small font in these games is not usable because it is too small, too ugly and not extendable for localization.
---
 source/core/console/c_notifybuffer.cpp | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/source/core/console/c_notifybuffer.cpp b/source/core/console/c_notifybuffer.cpp
index e0854a8cd..9cc219f34 100644
--- a/source/core/console/c_notifybuffer.cpp
+++ b/source/core/console/c_notifybuffer.cpp
@@ -79,6 +79,12 @@ CUSTOM_CVAR(Float, con_notifyscale, 1, CVAR_ARCHIVE)
 }
 
 
+static FFont* GetNotifyFont()
+{
+	return generic_ui ? NewSmallFont : isWW2GI()? ConFont : SmallFont ? SmallFont : AlternativeSmallFont;
+
+}
+
 void FNotifyBuffer::AddString(int printlevel, FString source)
 {
 	if (!(printlevel & PRINT_NOTIFY) && !con_notify_advanced) return;
@@ -93,7 +99,7 @@ void FNotifyBuffer::AddString(int printlevel, FString source)
 
 	auto screenratio = ActiveRatio(screen->GetWidth(), screen->GetHeight());
 
-	FFont* font = generic_ui ? NewSmallFont : SmallFont ? SmallFont : AlternativeSmallFont;
+	FFont* font = GetNotifyFont();
 	if (font == nullptr) return;	// Without an initialized font we cannot handle the message (this is for those which come here before the font system is ready.)
 	double fontscale = (generic_ui? 0.7 : NotifyFontScale) * con_notifyscale;
 
@@ -188,7 +194,7 @@ void FNotifyBuffer::Draw()
 	bool canskip = true;
 
 
-	FFont* font = generic_ui ? NewSmallFont : SmallFont? SmallFont : AlternativeSmallFont;
+	FFont* font = GetNotifyFont();
 	double nfscale = (generic_ui? 0.7 : NotifyFontScale);
 	double scale = 1 / (nfscale * con_notifyscale);