From 573c5035efaf486a3fc56c05115df456fe053143 Mon Sep 17 00:00:00 2001 From: Joe Wilm Date: Sat, 6 May 2017 23:09:07 -0700 Subject: Fix sign error in CoreText font rasterizer Descent was being reported as a positive value instead of negative. This caused the background and text alignment to be off dramatically. Resolves #545 --- font/src/darwin/mod.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'font/src/darwin/mod.rs') diff --git a/font/src/darwin/mod.rs b/font/src/darwin/mod.rs index cd27c6e2..3ced7524 100644 --- a/font/src/darwin/mod.rs +++ b/font/src/darwin/mod.rs @@ -334,7 +334,7 @@ impl Font { Metrics { average_advance: average_advance, line_height: line_height, - descent: self.ct_font.descent() as f32, + descent: -(self.ct_font.descent() as f32), } } -- cgit v1.2.3-54-g00ecf