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.
This commit is contained in:
22
doc/fixes36.2
Normal file
22
doc/fixes36.2
Normal file
@@ -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
|
||||
-------------------------------
|
||||
@@ -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, <insert date here>
|
||||
*
|
||||
*/
|
||||
|
||||
/* Patch 1, April 27, 2018
|
||||
* Over four hundred and seventy bug fixes and improvements.
|
||||
*/
|
||||
|
||||
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user