koishi-plugin-ll-mc 3.0.8 → 3.0.9

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.
Files changed (2) hide show
  1. package/lib/index.js +13 -0
  2. package/package.json +1 -1
package/lib/index.js CHANGED
@@ -384,6 +384,19 @@ async function apply(ctx, config) {
384
384
  fontFile
385
385
  );
386
386
  }
387
+ // 官机补丁:强制覆盖 NotoEmoji 字体(纯 emoji 版),
388
+ // 防止旧版本(带数字字形)缓存在 data/messageCounter/fonts/ 里导致数字被加宽
389
+ try {
390
+ const emojiSrc = import_path.default.join(assetsDir, "fonts", "NotoEmoji.ttf");
391
+ const emojiDest = import_path.default.join(fontsPath, "NotoEmoji.ttf");
392
+ await fs.copyFile(emojiSrc, emojiDest);
393
+ // 删除旧版补丁字体(避免旧版带数字字形的 patched 文件被继续加载、家族名冲突)
394
+ const patched = import_path.default.join(fontsPath, "NotoEmoji-patched.ttf");
395
+ await fs.rm(patched, { force: true });
396
+ logger.info("[ll-mc] 已强制更新 NotoEmoji 字体为纯 emoji 版,并清理旧补丁字体。");
397
+ } catch (error) {
398
+ logger.warn("[ll-mc] 强制更新 NotoEmoji 字体失败:", error?.message);
399
+ }
387
400
  const avatarCache = /* @__PURE__ */ new Map();
388
401
  let iconCache = [];
389
402
  let barBgImgCache = [];
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "koishi-plugin-ll-mc",
3
3
  "description": "消息数量统计插件(基于 koishi-plugin-message-counter 重做,官方QQ机器人兼容)",
4
- "version": "3.0.8",
4
+ "version": "3.0.9",
5
5
  "main": "lib/index.js",
6
6
  "typings": "lib/index.d.ts",
7
7
  "files": [