修复字体过小无法显示下划线

qdj
邱德佳 4 months ago
parent b0ea237408
commit ed10892e06

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

Loading…
Cancel
Save