Fix: [Win32] Force font mapper to only use TrueType fonts (#12406)

This commit is contained in:
Loïc Guilloux 2024-04-01 22:59:13 +02:00 committed by GitHub
parent 3de8853e29
commit 11aa3694fa
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 5 deletions

View File

@ -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.
@ -171,7 +167,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);