https://git.reactos.org/?p=reactos.git;a=commitdiff;h=5ecf017ce2b6c6c8a6a28…
commit 5ecf017ce2b6c6c8a6a28f99ea60fe340f8bd825
Author: Katayama Hirofumi MZ <katayama.hirofumi.mz(a)gmail.com>
AuthorDate: Tue Sep 6 15:35:14 2022 +0900
Commit: Katayama Hirofumi MZ <katayama.hirofumi.mz(a)gmail.com>
CommitDate: Tue Sep 6 15:35:14 2022 +0900
[NOTEPAD] CJK font workaround
Far East Asian users may not have suitable fixed-pitch fonts.
CORE-11700
---
base/applications/notepad/settings.c | 18 ++++++++++--------
1 file changed, 10 insertions(+), 8 deletions(-)
diff --git a/base/applications/notepad/settings.c b/base/applications/notepad/settings.c
index 1e5e5ae9732..8eadf20d8e5 100644
--- a/base/applications/notepad/settings.c
+++ b/base/applications/notepad/settings.c
@@ -184,19 +184,21 @@ void NOTEPAD_LoadSettingsFromRegistry(void)
ZeroMemory(&Globals.lfFont, sizeof(Globals.lfFont));
Globals.lfFont.lfCharSet = DEFAULT_CHARSET;
- Globals.lfFont.lfClipPrecision = CLIP_STROKE_PRECIS;
- Globals.lfFont.lfEscapement = 0;
LoadString(Globals.hInstance, STRING_DEFAULTFONT, Globals.lfFont.lfFaceName,
ARRAY_SIZE(Globals.lfFont.lfFaceName));
- Globals.lfFont.lfItalic = FALSE;
- Globals.lfFont.lfOrientation = 0;
- Globals.lfFont.lfOutPrecision = OUT_STRING_PRECIS;
Globals.lfFont.lfPitchAndFamily = FIXED_PITCH | FF_MODERN;
- Globals.lfFont.lfQuality = PROOF_QUALITY;
- Globals.lfFont.lfStrikeOut = FALSE;
- Globals.lfFont.lfUnderline = FALSE;
Globals.lfFont.lfWeight = FW_NORMAL;
Globals.lfFont.lfHeight = HeightFromPointSize(100);
+
+ /* WORKAROUND: Far East Asian users may not have suitable fixed-pitch fonts. */
+ switch (PRIMARYLANGID(GetUserDefaultLangID()))
+ {
+ case LANG_CHINESE:
+ case LANG_JAPANESE:
+ case LANG_KOREAN:
+ Globals.lfFont.lfPitchAndFamily = DEFAULT_PITCH | FF_DONTCARE;
+ break;
+ }
}
hFont = CreateFontIndirect(&Globals.lfFont);