From fabae740e119714f91e661533771b6ad6d5608b6 Mon Sep 17 00:00:00 2001 From: James-ctrl-Doyle <67906228+James-ctrl-Doyle@users.noreply.github.com> Date: Sat, 12 Sep 2026 15:39:14 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E9=BB=98=E8=AE=A4=E5=A4=96=E8=A7=82?= =?UTF-8?q?=E6=94=B9=E4=B8=BA=E6=B7=B1=E8=89=B2=E4=B8=BB=E9=A2=98=EF=BC=88?= =?UTF-8?q?=E5=BE=AE=E8=BD=AF=E9=9B=85=E9=BB=91=20/=20=E5=B8=B8=E8=A7=84?= =?UTF-8?q?=20/=2015pt=20/=20=E7=99=BD=E5=AD=97=20/=20#121212=20=E8=83=8C?= =?UTF-8?q?=E6=99=AF=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 默认字体由 Segoe UI Light 14pt 改为 微软雅黑 15pt(小三),字形由 FW_LIGHT 改为 FW_NORMAL(常规) - 正文与章节文字默认颜色由黑色改为白色 - 默认背景色由 #FFFFFF 改为 #121212,与白字构成深色阅读主题 - 字体名以 \u 转义书写,保持本文件为纯 ASCII,避免源码字符集导致的解析问题 说明:仅改变「新用户 / 恢复默认配置」时的默认值,已有配置文件不受影响。 --- Reader/Cache.cpp | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/Reader/Cache.cpp b/Reader/Cache.cpp index c2f0fda..7dabdcb 100644 --- a/Reader/Cache.cpp +++ b/Reader/Cache.cpp @@ -302,22 +302,24 @@ void Cache::default_header(header_t* header) static HFONT hFont = NULL; static LOGFONT lf; int i; - const int PointSize = 14; + const int PointSize = 15; // xiao-san (15pt) int nHeight; if (!hFont) { nHeight = -MulDiv(PointSize, GetDeviceCaps(GetDC(NULL), LOGPIXELSY), 72); + // "\u5FAE\u8F6F\u96C5\u9ED1" = Microsoft YaHei, written with escapes so + // this file stays pure ASCII (no source-charset pitfalls). hFont = CreateFont(nHeight, 0, 0, 0, - FW_LIGHT, FALSE, FALSE, FALSE, + FW_NORMAL, FALSE, FALSE, FALSE, ANSI_CHARSET, OUT_STROKE_PRECIS, CLIP_STROKE_PRECIS, PROOF_QUALITY, - VARIABLE_PITCH | FF_SWISS, _T("Segoe UI Light")); + VARIABLE_PITCH | FF_SWISS, _T("\u5FAE\u8F6F\u96C5\u9ED1")); GetObject(hFont, sizeof(lf), &lf); } memcpy(&header->font, &lf, sizeof(lf)); - header->font_color = 0x00; // black + header->font_color = 0x00FFFFFF; // white memcpy(&header->font_title, &lf, sizeof(lf)); - header->font_color_title = 0x00; // black + header->font_color_title = 0x00FFFFFF; // white header->use_same_font = 1; // default style @@ -364,7 +366,7 @@ void Cache::default_header(header_t* header) #endif // default bk color - header->bg_color = 0x00ffffff; // White + header->bg_color = 0x00121212; // #121212 header->alpha = 0xff; header->char_gap = 0;