diff options
Diffstat (limited to 'font/src/rusttype/mod.rs')
-rw-r--r-- | font/src/rusttype/mod.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/font/src/rusttype/mod.rs b/font/src/rusttype/mod.rs index 2d28a8bd..bd4b8df1 100644 --- a/font/src/rusttype/mod.rs +++ b/font/src/rusttype/mod.rs @@ -38,11 +38,11 @@ impl crate::Rasterize for RustTypeRasterizer { let average_advance = f64::from(hmetrics.advance_width); let descent = vmetrics.descent; - // Strikeout and underline metrics - // RustType doesn't support these, so we make up our own + // Strikeout and underline metrics. + // RustType doesn't support these, so we make up our own. let thickness = (descent / 5.).round(); - let underline_position = descent / 2. + thickness / 2.; - let strikeout_position = (line_height as f32 / 2. - descent).round(); + let underline_position = descent / 2.; + let strikeout_position = line_height as f32 / 2. - descent; Ok(Metrics { descent, |