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) {