From 98de1423ea61fb9332b3d131bc6efd9e02306f96 Mon Sep 17 00:00:00 2001 From: drfrag Date: Wed, 27 May 2020 23:41:38 +0200 Subject: [PATCH] - Reload fake fonts, people keep doing it and that made some mods incompatible. --- src/v_font.cpp | 27 +++++++++++++++++++++++++-- 1 file changed, 25 insertions(+), 2 deletions(-) diff --git a/src/v_font.cpp b/src/v_font.cpp index c65bc4bc4..213c18e31 100644 --- a/src/v_font.cpp +++ b/src/v_font.cpp @@ -3727,10 +3727,33 @@ void V_InitFonts() { BigFont = SmallFont; } + + // ugly hack for fake fonts + if (!(NewSmallFont = V_GetFont("NewSmallFont", "SMALLFNT"))) + { + if (Wads.CheckNumForName ("FONTA_S") >= 0) + { + NewSmallFont = new FFont("NewSmallFont", "FONTA%02u", "defsmallfont", HU_FONTSTART, HU_FONTSIZE, 1, -1); + SmallFont->SetCursor('['); + } + else if (Wads.CheckNumForName ("STCFN033", ns_graphics) >= 0) + { + NewSmallFont = new FFont("NewSmallFont", "STCFN%.3d", "defsmallfont", HU_FONTSTART, HU_FONTSIZE, HU_FONTSTART, -1); + } + } + + if (!(NewConsoleFont = V_GetFont("NewConsoleFont", "CONFONT"))) + { + NewConsoleFont = ConFont; + } + + if (NewSmallFont == nullptr) + { + NewSmallFont = SmallFont; + } + // hack hack - NewConsoleFont = ConFont; CurrentConsoleFont = ConFont; - NewSmallFont = SmallFont; AlternativeSmallFont = SmallFont; OriginalSmallFont = SmallFont; OriginalBigFont = BigFont;