koishi-plugin-ll-mc 3.1.13 → 3.1.14

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/index.js CHANGED
@@ -61,8 +61,8 @@ var usage = `## 📝 使用说明
61
61
  详细选项请发送 \`help messageCounter\` 查看。`;
62
62
  var logger = new import_koishi.Logger("messageCounter");
63
63
  var FONT_OPTIONS = {
64
- TITLE: "HarmonyOS_Sans_Medium",
65
- NICKNAME: "HarmonyOS_Sans_Medium"
64
+ TITLE: "NotoSans-Regular",
65
+ NICKNAME: "NotoSans-Regular"
66
66
  };
67
67
  var Config = import_koishi.Schema.intersect([
68
68
  // --- 核心功能 ---
@@ -283,7 +283,7 @@ async function apply(ctx, config) {
283
283
  } catch (error) {
284
284
  logger.warn("无法加载 fallbackBase64.json,将使用空的回退头像。", error);
285
285
  }
286
- const fontFiles = ["HarmonyOS_Sans_Medium.ttf", "NotoEmoji.ttf"];
286
+ const fontFiles = ["NotoSans-Regular.ttf", "NotoEmoji.ttf"];
287
287
  for (const fontFile of fontFiles) {
288
288
  await copyAssetIfNotExists(
289
289
  import_path.default.join(assetsDir, "fonts"),
@@ -1793,7 +1793,7 @@ ${targetUserRecord[0].username}
1793
1793
  let context = canvas.getContext('2d');
1794
1794
 
1795
1795
  // 根据最大计数的文本宽度动态调整画布宽度,以防数字溢出
1796
- context.font = \`30px "\${config.chartNicknameFont}", HarmonyOS_Sans_Medium, "Microsoft YaHei", sans-serif, "NotoEmoji"\`;
1796
+ context.font = \`30px "\${config.chartNicknameFont}", NotoSans-Regular, "Microsoft YaHei", sans-serif, "NotoEmoji"\`;
1797
1797
  // 找到拥有最大发言数的条目,因为它的文本通常最长
1798
1798
  const maxCountData = rankingData.find(d => d.count === maxCount) || rankingData[0] || { count: 1, percentage: 0 };
1799
1799
  let maxCountText = maxCount.toString();
@@ -1877,7 +1877,7 @@ ${targetUserRecord[0].username}
1877
1877
 
1878
1878
  async function drawTextAndIcons(context, data, index, avgColor, barX, barY, barWidth, barHeight) {
1879
1879
  // 字体栈包含了用户选择的字体、插件内置字体和通用字体,以确保兼容性。
1880
- context.font = \`30px "\${config.chartNicknameFont}", HarmonyOS_Sans_Medium, "Microsoft YaHei", sans-serif, "NotoEmoji"\`;
1880
+ context.font = \`30px "\${config.chartNicknameFont}", NotoSans-Regular, "Microsoft YaHei", sans-serif, "NotoEmoji"\`;
1881
1881
  const textY = barY + barHeight / 2 + 10.5;
1882
1882
 
1883
1883
 
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.1.13",
4
+ "version": "3.1.14",
5
5
  "main": "lib/index.js",
6
6
  "typings": "lib/index.d.ts",
7
7
  "files": [