From 9c7cb17823b5ae22ad8cf6846d43aec6a96bf3a7 Mon Sep 17 00:00:00 2001 From: Roy Tam Date: Sat, 1 Feb 2020 13:31:09 +0800 Subject: [PATCH] gfx: fix font selection in NT 3.51 --- gfx/src/windows/nsDeviceContextWin.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/gfx/src/windows/nsDeviceContextWin.cpp b/gfx/src/windows/nsDeviceContextWin.cpp index b131e0c5..8a0ccd66 100644 --- a/gfx/src/windows/nsDeviceContextWin.cpp +++ b/gfx/src/windows/nsDeviceContextWin.cpp @@ -585,6 +585,8 @@ NS_IMETHODIMP nsDeviceContextWin :: CheckFontExistence(const nsString& aFontName aFontName.ToCString(logFont.lfFaceName, LF_FACESIZE); ::EnumFontFamiliesEx(hdc, &logFont, (FONTENUMPROC)fontcallback, (LPARAM)&isthere, 0); + if (!isthere) + ::EnumFontFamilies(hdc, logFont.lfFaceName, (FONTENUMPROC)fontcallback, (LPARAM)&isthere); ::ReleaseDC(hwnd, hdc);