Merge pull request #42 from roytam1/fontenum-nt351fix

gfx: fix font selection in NT 3.51
This commit is contained in:
rn10950 2021-01-15 06:37:22 -05:00 committed by GitHub
commit f62ccdd959
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 0 deletions

View File

@ -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);