From bf36f7aa3f35a7198d811c4c001ecab5c35c9cd7 Mon Sep 17 00:00:00 2001 From: wangjia <809946525@qq.com> Date: Mon, 15 Jun 2026 19:04:32 +0800 Subject: [PATCH] =?UTF-8?q?fix(client):=20=E6=A0=87=E7=AD=BE=E5=AD=97?= =?UTF-8?q?=E4=BD=93=E7=BB=86=E5=8C=96=EF=BC=9A=E9=98=88=E5=80=BC=20128?= =?UTF-8?q?=EF=BC=8C=E5=BA=97=E5=90=8D=E7=BB=86=E4=BD=93?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Sonnet 4.6 --- CHANGELOG.md | 5 +++++ client/lib/core/utils/print_util_stub.dart | 6 +++--- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 641a299..19a705e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,11 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [1.0.51] - 2026-06-15 + +### 改进 +- 标签打印字体细化:阈值调回 128,店名改细体,商品名保持粗体 + ## [1.0.50] - 2026-06-15 ### 改进 diff --git a/client/lib/core/utils/print_util_stub.dart b/client/lib/core/utils/print_util_stub.dart index cc309ed..abdd980 100644 --- a/client/lib/core/utils/print_util_stub.dart +++ b/client/lib/core/utils/print_util_stub.dart @@ -240,8 +240,8 @@ Future _renderLabelBitmap({ final codeText = code.isNotEmpty ? '编号:$code' : ''; final rows = <(String, double, bool)>[ - if (shop.isNotEmpty) (shop, kShopSize, true), - if (name.isNotEmpty) (name, nameSize, true), + if (shop.isNotEmpty) (shop, kShopSize, false), // 店名细体,突出商品名 + if (name.isNotEmpty) (name, nameSize, true), // 商品名粗体 if (codeText.isNotEmpty) (codeText, kSmallSize, false), if (degSpec.isNotEmpty) (degSpec, kSmallSize, false), if (date.isNotEmpty) (date, kSmallSize, false), @@ -311,7 +311,7 @@ Future _printFlatLabelThermal({ : 0.299 * rgba[i] + 0.587 * rgba[i + 1] + 0.114 * rgba[i + 2]; } } - if (lum / 4 < 160) row[xx >> 3] &= ~(0x80 >> (xx & 7)); // 黑点 -> bit0 + if (lum / 4 < 128) row[xx >> 3] &= ~(0x80 >> (xx & 7)); // 黑点 -> bit0 } out.add(row); }