From e61c28e451526d396131b0a1e9598705d56b2714 Mon Sep 17 00:00:00 2001 From: Kirill Chibisov Date: Wed, 22 Jan 2020 23:47:59 +0300 Subject: Fix underline position for bitmap fonts Fixes #3235. --- font/src/ft/mod.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'font/src/ft/mod.rs') diff --git a/font/src/ft/mod.rs b/font/src/ft/mod.rs index 5c5c4a73..f91acd03 100644 --- a/font/src/ft/mod.rs +++ b/font/src/ft/mod.rs @@ -108,7 +108,7 @@ impl Rasterize for FreeTypeRasterizer { // Fallback for bitmap fonts which do not provide underline metrics if underline_position == 0. { - underline_thickness = (descent / 5.).round(); + underline_thickness = (descent.abs() / 5.).round(); underline_position = descent / 2.; } -- cgit v1.2.3-54-g00ecf