From ed10892e06859983824da645231b0f91198d0912 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=82=B1=E5=BE=B7=E4=BD=B3?= <798951257@qq.com> Date: Thu, 9 Oct 2025 17:48:56 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=AD=97=E4=BD=93=E8=BF=87?= =?UTF-8?q?=E5=B0=8F=E6=97=A0=E6=B3=95=E6=98=BE=E7=A4=BA=E4=B8=8B=E5=88=92?= =?UTF-8?q?=E7=BA=BF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/qelmt/mod.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/qelmt/mod.rs b/src/qelmt/mod.rs index 51d77de..5d7c653 100644 --- a/src/qelmt/mod.rs +++ b/src/qelmt/mod.rs @@ -1748,7 +1748,9 @@ impl Display for FontInfo { impl FontInfo { fn apply_height(&mut self, height: f64) { self.point_size = height; - self.pixel_size = height; + // Qt ignores point size when pixel size is set; tiny pixel fonts lose glyph details + // so only set pixel size when the height is large enough to render reliably. + self.pixel_size = if height >= 3.0 { height } else { 0.0 }; } fn scale(&mut self, fact: f64) {