From 331abfe53096d68bcf5b4e8e1190848a7cab9f4d Mon Sep 17 00:00:00 2001 From: nhmall Date: Sat, 28 Apr 2018 12:11:19 -0400 Subject: [PATCH] Specify both width and height when creating font for width testing From Bart... When we are creating the console font for testing character widths, we were not specifying width. Because of this, the created font's average width might be larger then what we expect and we might falsely detect that the font was inappropriate for playing Nethack. Fix provides the width that we are expecting when creating the font. --- doc/fixes36.2 | 22 ++++++++++++++++++++++ include/patchlevel.h | 10 +++++++--- sys/winnt/nttty.c | 4 ++-- 3 files changed, 31 insertions(+), 5 deletions(-) create mode 100644 doc/fixes36.2 diff --git a/doc/fixes36.2 b/doc/fixes36.2 new file mode 100644 index 000000000..df24cfbf4 --- /dev/null +++ b/doc/fixes36.2 @@ -0,0 +1,22 @@ +$NHDT-Branch: $:$NHDT-Revision: $ $NHDT-Date: $ + +This fixes36.2 file is here to capture information about updates in the 3.6.x +lineage following the release of 3.6.1 in April 2018. Please note, however, +that another 3.6.x release is not anticipated, and most developer focus will +shift to the next major release. + +General Fixes and Modified Features +----------------------------------- + + +Fixes to Post-3.6.1 Problems that Were Exposed Via git Repository +------------------------------------------------------------------ + + +Platform- and/or Interface-Specific Fixes +----------------------------------------- +windows-tty: Specify both width and height when creating font for width testing + + +Code Cleanup and Reorganization +------------------------------- diff --git a/include/patchlevel.h b/include/patchlevel.h index 6037e019a..e58622943 100644 --- a/include/patchlevel.h +++ b/include/patchlevel.h @@ -1,15 +1,15 @@ -/* NetHack 3.6 patchlevel.h $NHDT-Date: 1524690061 2018/04/25 21:01:01 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.119 $ */ +/* NetHack 3.6 patchlevel.h $NHDT-Date: 1524931630 2018/04/28 16:07:10 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.121 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /*-Copyright (c) Michael Allison, 2012. */ /* NetHack may be freely redistributed. See license for details. */ -/* NetHack 3.6.1 */ +/* NetHack 3.6.x */ #define VERSION_MAJOR 3 #define VERSION_MINOR 6 /* * PATCHLEVEL is updated for each release. */ -#define PATCHLEVEL 1 +#define PATCHLEVEL 2 /* * Incrementing EDITLEVEL can be used to force invalidation of old bones * and save files. @@ -36,6 +36,10 @@ /****************************************************************************/ /* Version 3.6.x */ +/* Patch 2, + * + */ + /* Patch 1, April 27, 2018 * Over four hundred and seventy bug fixes and improvements. */ diff --git a/sys/winnt/nttty.c b/sys/winnt/nttty.c index 1d2d8c89f..f0532b083 100644 --- a/sys/winnt/nttty.c +++ b/sys/winnt/nttty.c @@ -1,4 +1,4 @@ -/* NetHack 3.6 nttty.c $NHDT-Date: 1520825872 2018/03/12 03:37:52 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.70 $ */ +/* NetHack 3.6 nttty.c $NHDT-Date: 1524931557 2018/04/28 16:05:57 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.71 $ */ /* Copyright (c) NetHack PC Development Team 1993 */ /* NetHack may be freely redistributed. See license for details. */ @@ -1550,7 +1550,7 @@ check_font_widths() LOGFONTW console_font_log_font = matching_log_font; console_font_log_font.lfWeight = console_font_info.FontWeight; console_font_log_font.lfHeight = console_font_info.dwFontSize.Y; - console_font_log_font.lfWidth = 0; + console_font_log_font.lfWidth = console_font_info.dwFontSize.X; HFONT console_font = CreateFontIndirectW(&console_font_log_font); if (console_font == NULL) {