From: Holger Schemel Date: Sat, 9 Nov 2024 15:53:28 +0000 (+0100) Subject: fixed font width calculation for level story title X-Git-Tag: 4.4.0.0-test-4~66 X-Git-Url: https://git.artsoft.org/?a=commitdiff_plain;h=b4628f056b1ae853203e1d4e358dc8f9976d0e05;p=rocksndiamonds.git fixed font width calculation for level story title --- diff --git a/src/screens.c b/src/screens.c index f5f47981..688c07a0 100644 --- a/src/screens.c +++ b/src/screens.c @@ -1762,7 +1762,8 @@ static void DrawInfoScreen_Headline(int screen_nr, int num_screens, char *text_format = (info_mode == INFO_MODE_STORY ? "%s" : use_global_screens ? "for %s" : "for \"%s\""); int text_format_len = strlen(text_format) - strlen("%s"); - int max_text_len = SXSIZE / getFontWidth(FONT_TITLE_2); + int text_font = (info_mode == INFO_MODE_STORY ? FONT_TITLE_STORY : FONT_TITLE_2); + int max_text_len = SXSIZE / getFontWidth(text_font); int max_name_len = max_text_len - text_format_len; char name_cut[max_name_len]; char *name_full = (info_mode == INFO_MODE_STORY ? level.name_native :