From 93ad3ae7c5949744f54ae5b42adc9441dd47246d Mon Sep 17 00:00:00 2001 From: Clownacy Date: Fri, 17 Apr 2020 14:16:49 +0100 Subject: [PATCH] Make font look better at 320x240 This restores some vanilla logic, where at 320x240, the font would use a slightly larger size, in order to not look terrible. --- src/Draw.cpp | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/src/Draw.cpp b/src/Draw.cpp index 095482a0..9ff5aad5 100644 --- a/src/Draw.cpp +++ b/src/Draw.cpp @@ -619,7 +619,23 @@ void InitTextObject(const char *name) char path[MAX_PATH]; sprintf(path, "%s/Font/font", gDataPath); - font = LoadFont(path, 8 * magnification, 9 * magnification); + // Get font size + unsigned int width, height; + + switch (magnification) + { + case 1: + height = 10; + width = 9; + break; + + case 2: + height = 9; + width = 8; + break; + } + + font = LoadFont(path, width * magnification, height * magnification); } void PutText(int x, int y, const char *text, unsigned long color)