mirror of
https://github.com/rizonesoft/Notepad3.git
synced 2026-06-17 21:03:19 +08:00
Merge pull request #4163 from RaiKoHoff/Dev_Master
Fix propagate default font to undefined-font styles
This commit is contained in:
commit
c7ca75467c
@ -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
|
||||
|
||||
Loading…
Reference in New Issue
Block a user