From f72b3fbd489935e986989a3bdaa396ec33bd0a29 Mon Sep 17 00:00:00 2001 From: Gleb Mazovetskiy Date: Fri, 18 Oct 2019 00:31:35 +0100 Subject: [PATCH] credits.cpp: Enum for CreateFontA iPitchAndFamily (#1811) * credits.cpp: Enum for CreateFontA iPitchAndFamily From https://docs.microsoft.com/en-us/windows/win32/api/wingdi/nf-wingdi-createfonta: > The two low-order bits specify the pitch of the font > The four high-order bits specify the font family [[MS-WMF]: 2.1.1.8 FamilyFont Enumeration](https://docs.microsoft.com/en-us/openspecs/windows_protocols/ms-wmf/9a632766-1f1c-4e2b-b1a4-f5b1a45f99ad) [[MS-WMF]: 2.1.1.24 PitchFont Enumeration](https://docs.microsoft.com/en-us/openspecs/windows_protocols/ms-wmf/22dbe377-aec4-4669-88e6-b8fdd9351d76) * credits.cpp: Use enum for font weight https://docs.microsoft.com/en-us/windows/win32/api/wingdi/nf-wingdi-createfonta --- DiabloUI/credits.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DiabloUI/credits.cpp b/DiabloUI/credits.cpp index b6e6b3d6c..110cfde91 100644 --- a/DiabloUI/credits.cpp +++ b/DiabloUI/credits.cpp @@ -135,7 +135,7 @@ void __fastcall credits_LoadImgCreditTxt(HWND hWnd, LPARAM lParam) SDlgSetBitmapI(v13, 0, 0, -1, 1, credit_back_img, (int)&Rect, v7, v8, -1); credit_vertical_pos2 = v8 - 30; credits_CalcPosROP3(hWnd); - v9 = CreateFontA(-17, 0, 0, 0, 700, 0, 0, 0, 0, 0, 0, 0, 0x12u, "Times New Roman"); + v9 = CreateFontA(-17, 0, 0, 0, FW_BOLD, 0, 0, 0, 0, 0, 0, 0, VARIABLE_PITCH | (FF_SCRIPT << 2), "Times New Roman"); if (!v9 || (v11 = SGdiImportFont(v9, (int)&creditsobj), DeleteObject(v9), !v11)) Title_KillAndFadeDlg(hWnd); }