Skip to content

Commit b7ccc7d

Browse files
committed
Don't round vertical metrics
1 parent 4307d3f commit b7ccc7d

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

parley/src/layout/line/greedy.rs

+2-6
Original file line numberDiff line numberDiff line change
@@ -588,16 +588,12 @@ impl<'a, B: Brush> BreakLines<'a, B> {
588588
}
589589
}
590590

591-
// Round block/vertical axis metrics
592-
line.metrics.ascent = line.metrics.ascent.round();
593-
line.metrics.descent = line.metrics.descent.round();
594-
line.metrics.line_height = line.metrics.line_height.round();
595591
line.metrics.leading =
596592
line.metrics.line_height - (line.metrics.ascent + line.metrics.descent);
597593

598594
// Compute
599-
let above = (line.metrics.ascent + line.metrics.leading * 0.5).round();
600-
let below = (line.metrics.descent + line.metrics.leading * 0.5).round();
595+
let above = line.metrics.ascent + line.metrics.leading * 0.5;
596+
let below = line.metrics.descent + line.metrics.leading * 0.5;
601597
line.metrics.min_coord = y;
602598
line.metrics.baseline = y + above;
603599
y = line.metrics.baseline + below;

0 commit comments

Comments
 (0)