diff --git a/src/os/windows/font_win32.cpp b/src/os/windows/font_win32.cpp --- a/src/os/windows/font_win32.cpp +++ b/src/os/windows/font_win32.cpp @@ -78,7 +78,7 @@ FT_Error GetFontByFaceName(const char *f ret = RegOpenKeyEx(HKEY_LOCAL_MACHINE, FONT_DIR_NT, 0, KEY_READ, &hKey); if (ret != ERROR_SUCCESS) { - DEBUG(freetype, 0, "Cannot open registry key HKLM\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\Fonts"); + Debug(freetype, 0, "Cannot open registry key HKLM\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\Fonts"); return err; } @@ -113,7 +113,7 @@ FT_Error GetFontByFaceName(const char *f } if (!SUCCEEDED(SHGetFolderPath(nullptr, CSIDL_FONTS, nullptr, SHGFP_TYPE_CURRENT, vbuffer))) { - DEBUG(freetype, 0, "SHGetFolderPath cannot return fonts directory"); + Debug(freetype, 0, "SHGetFolderPath cannot return fonts directory"); goto folder_error; } @@ -334,17 +334,17 @@ static int CALLBACK EnumFontCallback(con info->callback->SetFontNames(info->settings, font_name, &logfont->elfLogFont); if (info->callback->FindMissingGlyphs()) return 1; - DEBUG(freetype, 1, "Fallback font: %s (%s)", font_name, english_name); + Debug(freetype, 1, "Fallback font: {} ({})", font_name, english_name); return 0; // stop enumerating } bool SetFallbackFont(FreeTypeSettings *settings, const char *language_isocode, int winlangid, MissingGlyphSearcher *callback) { - DEBUG(freetype, 1, "Trying fallback fonts"); + Debug(freetype, 1, "Trying fallback fonts"); EFCParam langInfo; if (GetLocaleInfo(MAKELCID(winlangid, SORT_DEFAULT), LOCALE_FONTSIGNATURE, (LPTSTR)&langInfo.locale, sizeof(langInfo.locale) / sizeof(wchar_t)) == 0) { /* Invalid langid or some other mysterious error, can't determine fallback font. */ - DEBUG(freetype, 1, "Can't get locale info for fallback font (langid=0x%x)", winlangid); + Debug(freetype, 1, "Can't get locale info for fallback font (langid=0x{:x})", winlangid); return false; } langInfo.settings = settings; @@ -439,7 +439,7 @@ void Win32FontCache::SetFontSize(FontSiz this->glyph_size.cx = otm->otmTextMetrics.tmMaxCharWidth; this->glyph_size.cy = otm->otmTextMetrics.tmHeight; - DEBUG(freetype, 2, "Loaded font '%s' with size %d", FS2OTTD((LPWSTR)((BYTE *)otm + (ptrdiff_t)otm->otmpFullName)).c_str(), pixels); + Debug(freetype, 2, "Loaded font '{}' with size {}", FS2OTTD((LPWSTR)((BYTE *)otm + (ptrdiff_t)otm->otmpFullName)), pixels); } /**