Merge pull request #4163 from RaiKoHoff/Dev_Master

Fix propagate default font to undefined-font styles
This commit is contained in:
Rainer Kottenhoff 2022-09-02 13:49:59 +02:00 committed by GitHub
commit c7ca75467c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -3818,17 +3818,11 @@ void Style_SetStyles(HWND hwnd, const int iStyle, LPCWSTR lpszStyle)
if (bIsDefaultStyle) {
Style_StrGetFontName(L"font:$Code", wchFontName, COUNTOF(wchFontName));
}
else {
GetDefaultCodeFont(wchFontName, COUNTOF(wchFontName));
}
}
if (StrIsNotEmpty(wchFontName)) {
char chSetFontName[LF_FACESIZE<<2] = { '\0' };
WideCharToMultiByte(CP_UTF8, 0, wchFontName, -1, chSetFontName, (int)COUNTOF(chSetFontName), NULL, NULL);
SciCall_StyleSetFont(iStyle, chSetFontName);
//char chGetFontName[LF_FACESIZE << 2] = { '\0' };
//SciCall_StyleGetFont(iStyle, chGetFontName);
//assert(StringCchCompareXA(chGetFontName, chSetFontName) == 0);
}
// Font Weight