From c30768d60539b8395db682148cbdf30d4ec79452 Mon Sep 17 00:00:00 2001 From: Linzm <1015157648@qq.com> Date: Mon, 29 Dec 2025 14:32:51 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=EF=BC=9A=E8=8B=B1=E6=96=87?= =?UTF-8?q?=E5=AD=97=E7=AC=A6=E5=AE=BD=E5=BA=A6=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/utils/textHelper.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/utils/textHelper.ts b/src/utils/textHelper.ts index ed8e09a..4898122 100644 --- a/src/utils/textHelper.ts +++ b/src/utils/textHelper.ts @@ -194,7 +194,7 @@ export function createTextPosition({ setData }) { charWidth = fontSize * 0.6; } else if (/[a-zA-Z]/.test(char)) { // 英文字母:宽度约为 fontSize * 0.6(大写)或 0.5(小写) - charWidth = /[A-Z]/.test(char) ? fontSize * 0.65 : fontSize * 0.5; + charWidth = /[A-Z]/.test(char) ? fontSize * 0.6 : fontSize * 0.45; } else if (/[\u3000-\u303f\uff00-\uffef]/.test(char)) { // 全角符号:宽度约为 fontSize charWidth = fontSize; @@ -213,7 +213,7 @@ export function createTextPosition({ setData }) { } // 为文字之间添加2px间距(除了最后一个字符) - const spacing = 2; + const spacing = 0; const totalSpacing = (text.length > 1) ? (text.length - 1) * spacing : 0; const totalWidthWithSpacing = totalWidth + totalSpacing;