koishi-plugin-my-pig-group-friends 1.1.0 → 1.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/config.d.ts CHANGED
@@ -18,5 +18,6 @@ export interface Config {
18
18
  logRetentionDays: number;
19
19
  experimentalAutoDetect: boolean;
20
20
  debug: boolean;
21
+ emojiFont: 'Noto Color Emoji' | 'Twemoji' | 'System';
21
22
  }
22
23
  export declare const Config: Schema<Config>;
package/lib/index.js CHANGED
@@ -177,6 +177,7 @@ async function generateFootprintCard(ctx, config, data, userInfo, platform, back
177
177
  }
178
178
  const now = /* @__PURE__ */ new Date();
179
179
  const dateStr = `${now.getFullYear()}年${now.getMonth() + 1}月${now.getDate()}日`;
180
+ const emojiFont = config.emojiFont === "System" ? "" : `"${config.emojiFont}", `;
180
181
  const html = `
181
182
  <!DOCTYPE html>
182
183
  <html>
@@ -195,7 +196,7 @@ async function generateFootprintCard(ctx, config, data, userInfo, platform, back
195
196
  height: 1920px;
196
197
  overflow: hidden;
197
198
  /* Prioritize system fonts with wide Unicode coverage for emoji and CJK support */
198
- font-family: "Noto Sans CJK SC", "Noto Sans SC", "Source Han Sans SC", "Microsoft YaHei", "WenQuanYi Micro Hei", "Droid Sans Fallback", "PingFang SC", -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Helvetica Neue", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji";
199
+ font-family: ${emojiFont}"Noto Sans CJK SC", "Noto Sans SC", "Source Han Sans SC", "Microsoft YaHei", "WenQuanYi Micro Hei", "Droid Sans Fallback", "PingFang SC", -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Helvetica Neue", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji";
199
200
  background: #f0f0f2;
200
201
  --bg-image: url('${bgImage}');
201
202
  }
@@ -1302,6 +1303,11 @@ var import_koishi = require("koishi");
1302
1303
  var Config = import_koishi.Schema.intersect([
1303
1304
  import_koishi.Schema.object({
1304
1305
  outputMode: import_koishi.Schema.union(["text", "image"]).default("image").description("输出模式:text 纯文本,image 生成精美卡片"),
1306
+ emojiFont: import_koishi.Schema.union([
1307
+ import_koishi.Schema.const("System").description("系统默认"),
1308
+ import_koishi.Schema.const("Noto Color Emoji").description("Noto Color Emoji"),
1309
+ import_koishi.Schema.const("Twemoji").description("Twemoji (Twitter Emoji)")
1310
+ ]).default("System").description("Emoji 字体偏好(需确保容器内已安装相应字体)"),
1305
1311
  travelMessageTemplate: import_koishi.Schema.string().default("去了 {landmark},{country}!📸").description("旅行消息模板(可用变量:{landmark} 地标名, {country} 国家名)")
1306
1312
  }).description("基础设置"),
1307
1313
  import_koishi.Schema.object({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "koishi-plugin-my-pig-group-friends",
3
- "version": "1.1.0",
3
+ "version": "1.1.1",
4
4
  "main": "lib/index.js",
5
5
  "types": "lib/index.d.ts",
6
6
  "files": [