From 149fbaef09a56613c72855bc60355c7848256500 Mon Sep 17 00:00:00 2001 From: Joe Wilm Date: Wed, 3 May 2017 15:12:23 -0700 Subject: Fix glyph offsets in cell We previously had a hard-coded value for aligning glyphs within cells. The font descent is now used, and the offset should be correct by default. --- font/src/lib.rs | 1 + 1 file changed, 1 insertion(+) (limited to 'font/src/lib.rs') diff --git a/font/src/lib.rs b/font/src/lib.rs index 292e2244..8428ec18 100644 --- a/font/src/lib.rs +++ b/font/src/lib.rs @@ -219,6 +219,7 @@ impl fmt::Debug for RasterizedGlyph { pub struct Metrics { pub average_advance: f64, pub line_height: f64, + pub descent: f32, } pub trait Rasterize { -- cgit