From 54093fb8b2976d6e6126b88437a1ed226874e3e8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Guilloux?= Date: Mon, 1 Apr 2024 22:59:13 +0200 Subject: [PATCH] Fix: [Win32] Force font mapper to only use TrueType fonts (#12406) (cherry picked from commit 11aa3694fa4523d1675708874e8bdea15ade3502) --- src/os/windows/font_win32.cpp | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/os/windows/font_win32.cpp b/src/os/windows/font_win32.cpp index c2172f861e..a2f0d4db0d 100644 --- a/src/os/windows/font_win32.cpp +++ b/src/os/windows/font_win32.cpp @@ -115,10 +115,6 @@ bool SetFallbackFont(FontCacheSettings *settings, const std::string &, int winla } -#ifndef ANTIALIASED_QUALITY -#define ANTIALIASED_QUALITY 4 -#endif - /** * Create a new Win32FontCache. * @param fs The font size that is going to be cached. @@ -170,7 +166,8 @@ void Win32FontCache::SetFontSize(int pixels) /* Create GDI font handle. */ this->logfont.lfHeight = -pixels; this->logfont.lfWidth = 0; - this->logfont.lfOutPrecision = ANTIALIASED_QUALITY; + this->logfont.lfOutPrecision = OUT_TT_ONLY_PRECIS; + this->logfont.lfQuality = ANTIALIASED_QUALITY; if (this->font != nullptr) { SelectObject(dc, this->old_font);