https://git.reactos.org/?p=reactos.git;a=commitdiff;h=a5fa4891e5fb907f4ac1a…
commit a5fa4891e5fb907f4ac1ae0675422d324c7c0fb0
Author: Katayama Hirofumi MZ <katayama.hirofumi.mz(a)gmail.com>
AuthorDate: Wed Sep 7 00:54:31 2022 +0900
Commit: Katayama Hirofumi MZ <katayama.hirofumi.mz(a)gmail.com>
CommitDate: Wed Sep 7 00:54:31 2022 +0900
[NOTEPAD] Follow-up of 'CJK font workaround'
- Revert some code.
- Add font name comments.
CORE-11700
---
base/applications/notepad/lang/ja-JP.rc | 2 +-
base/applications/notepad/lang/zh-CN.rc | 2 +-
base/applications/notepad/lang/zh-HK.rc | 2 +-
base/applications/notepad/lang/zh-TW.rc | 2 +-
base/applications/notepad/settings.c | 17 ++++++++++++++---
5 files changed, 18 insertions(+), 7 deletions(-)
diff --git a/base/applications/notepad/lang/ja-JP.rc
b/base/applications/notepad/lang/ja-JP.rc
index 3bddaac5438..9ccc5f27419 100644
--- a/base/applications/notepad/lang/ja-JP.rc
+++ b/base/applications/notepad/lang/ja-JP.rc
@@ -167,7 +167,7 @@ BEGIN
STRING_CR "Mac (CR)"
STRING_LINE_COLUMN "%d 行、%d 列"
STRING_PRINTERROR "ファイル
'%s'を印刷できません。\n\nプリンタがオンになっていて、正しく設定されているか確認して下さい。"
- STRING_DEFAULTFONT "MS ゴシック"
+ STRING_DEFAULTFONT "MS ゴシック" /* MS Gothic */
STRING_TEXT_DOCUMENT "テキスト文書"
STRING_NOTEPAD_AUTHORS "Copyright 1997,98 Marcel Baur, 2000 Mike McCormack, 2002
Sylvain Petreolle, 2002 Andriy Palamarchuk\r\n"
diff --git a/base/applications/notepad/lang/zh-CN.rc
b/base/applications/notepad/lang/zh-CN.rc
index 53ce5d64653..0fade682a67 100644
--- a/base/applications/notepad/lang/zh-CN.rc
+++ b/base/applications/notepad/lang/zh-CN.rc
@@ -174,7 +174,7 @@ BEGIN
STRING_CR "Mac(CR)"
STRING_LINE_COLUMN "行 %d,列 %d"
STRING_PRINTERROR "无法打印文件“%s”。\n\n请确保打印机已打开,并且已正确配置。"
- STRING_DEFAULTFONT "宋体"
+ STRING_DEFAULTFONT "宋体" /* SimSun */
STRING_TEXT_DOCUMENT "文本文档"
STRING_NOTEPAD_AUTHORS "版权所有 1997,98 Marcel Baur, 2000 Mike McCormack, 2002
Sylvain Petreolle, 2002 Andriy Palamarchuk\r\n"
diff --git a/base/applications/notepad/lang/zh-HK.rc
b/base/applications/notepad/lang/zh-HK.rc
index f8a42cc9ee9..cd08e43b22c 100644
--- a/base/applications/notepad/lang/zh-HK.rc
+++ b/base/applications/notepad/lang/zh-HK.rc
@@ -175,7 +175,7 @@ BEGIN
STRING_LINE_COLUMN "第 %d 行,第 %d 字元"
STRING_PRINTERROR "檔案「%s」列印失敗。\n\
請檢查印表機是否已經開機及正確設定。"
- STRING_DEFAULTFONT "新細明體"
+ STRING_DEFAULTFONT "新細明體" /* PMingLiU */
STRING_TEXT_DOCUMENT "純文字檔案"
STRING_NOTEPAD_AUTHORS "Copyright 1997,98 Marcel Baur, 2000 Mike McCormack, 2002
Sylvain Petreolle, 2002 Andriy Palamarchuk\r\n"
diff --git a/base/applications/notepad/lang/zh-TW.rc
b/base/applications/notepad/lang/zh-TW.rc
index 4e0c36cdab3..a1cfd19ca4d 100644
--- a/base/applications/notepad/lang/zh-TW.rc
+++ b/base/applications/notepad/lang/zh-TW.rc
@@ -174,7 +174,7 @@ BEGIN
STRING_CR "Mac (CR)"
STRING_LINE_COLUMN "第 %d 行,第 %d 字元"
STRING_PRINTERROR "檔案「%s」列印失敗。\n\n請檢查印表機是否已經開機和正確設定。"
- STRING_DEFAULTFONT "新細明體"
+ STRING_DEFAULTFONT "新細明體" /* PMingLiU */
STRING_TEXT_DOCUMENT "純文字檔案"
STRING_NOTEPAD_AUTHORS "Copyright 1997,98 Marcel Baur, 2000 Mike McCormack, 2002
Sylvain Petreolle, 2002 Andriy Palamarchuk\r\n"
diff --git a/base/applications/notepad/settings.c b/base/applications/notepad/settings.c
index 8eadf20d8e5..d0295937b43 100644
--- a/base/applications/notepad/settings.c
+++ b/base/applications/notepad/settings.c
@@ -184,11 +184,13 @@ 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.lfPitchAndFamily = FIXED_PITCH | FF_MODERN;
- Globals.lfFont.lfWeight = FW_NORMAL;
- Globals.lfFont.lfHeight = HeightFromPointSize(100);
+ Globals.lfFont.lfItalic = FALSE;
+ Globals.lfFont.lfOrientation = 0;
+ Globals.lfFont.lfOutPrecision = OUT_STRING_PRECIS;
/* WORKAROUND: Far East Asian users may not have suitable fixed-pitch fonts. */
switch (PRIMARYLANGID(GetUserDefaultLangID()))
@@ -198,7 +200,16 @@ void NOTEPAD_LoadSettingsFromRegistry(void)
case LANG_KOREAN:
Globals.lfFont.lfPitchAndFamily = DEFAULT_PITCH | FF_DONTCARE;
break;
+ default:
+ Globals.lfFont.lfPitchAndFamily = FIXED_PITCH | FF_MODERN;
+ break;
}
+
+ Globals.lfFont.lfQuality = PROOF_QUALITY;
+ Globals.lfFont.lfStrikeOut = FALSE;
+ Globals.lfFont.lfUnderline = FALSE;
+ Globals.lfFont.lfWeight = FW_NORMAL;
+ Globals.lfFont.lfHeight = HeightFromPointSize(100);
}
hFont = CreateFontIndirect(&Globals.lfFont);