From 020a9a4888375b8463d8063b950f4f27fcfaee85 Mon Sep 17 00:00:00 2001 From: Colin Cornaby Date: Sun, 11 Jun 2023 14:47:53 -0700 Subject: [PATCH] Using plWinDPI for DPI checks --- Sources/Plasma/PubUtilLib/plPipeline/plTextFont.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Sources/Plasma/PubUtilLib/plPipeline/plTextFont.cpp b/Sources/Plasma/PubUtilLib/plPipeline/plTextFont.cpp index e43b88a29d..a1d395bef6 100644 --- a/Sources/Plasma/PubUtilLib/plPipeline/plTextFont.cpp +++ b/Sources/Plasma/PubUtilLib/plPipeline/plTextFont.cpp @@ -108,7 +108,7 @@ uint16_t *plTextFont::IInitFontTexture() SetMapMode( hDC, MM_TEXT ); // Get the font data - int nHeight = -MulDiv( fSize, GetDeviceCaps(hDC, LOGPIXELSY), 72 ); + int nHeight = -MulDiv( fSize, plWinDpi::Instance().GetDpi(), 72); hFont = CreateFont( nHeight, 0, 0, 0, FW_NORMAL, FALSE, FALSE, FALSE, DEFAULT_CHARSET, OUT_DEFAULT_PRECIS, CLIP_DEFAULT_PRECIS, ANTIALIASED_QUALITY, VARIABLE_PITCH, fFace ); @@ -120,7 +120,7 @@ uint16_t *plTextFont::IInitFontTexture() void* fontData = std::malloc( fontDataSize ); GetFontData(hDC, 0, 0, fontData, fontDataSize); ftError = FT_New_Memory_Face(library, (FT_Byte *) fontData, fontDataSize, 0, &face); - FT_UInt freeTypeResolution = GetDeviceCaps(hDC, LOGPIXELSY); + FT_UInt freeTypeResolution = plWinDpi::Instance().GetDpi(); DeleteDC( hDC ); DeleteObject( hFont );