1
0
mirror of https://github.com/emilk/egui.git synced 2026-08-29 04:40:03 -04:00

Make text underline and strikethrough pixel perfect crisp (#5857)

Small visual fix: pixel-align any text underline or strikethrough.
Before they could be often be blurry.
This commit is contained in:
Emil Ernerfeldt
2025-03-28 20:37:38 +01:00
committed by GitHub
parent 884be3491d
commit 7ea3f762b8
4 changed files with 67 additions and 56 deletions

View File

@@ -866,7 +866,8 @@ fn add_row_hline(
let mut last_right_x = f32::NAN;
for glyph in &row.glyphs {
let (stroke, y) = stroke_and_y(glyph);
let (stroke, mut y) = stroke_and_y(glyph);
stroke.round_center_to_pixel(point_scale.pixels_per_point, &mut y);
if stroke == Stroke::NONE {
end_line(line_start.take(), last_right_x);