From 665b4d2aca81af48b8e0eaca4e709ef2e7825844 Mon Sep 17 00:00:00 2001 From: Laurenz Date: Fri, 13 Dec 2019 23:59:01 +0100 Subject: =?UTF-8?q?More=20consistent=20library=20code=20and=20functions=20?= =?UTF-8?q?=F0=9F=8E=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/layout/text.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/layout/text.rs') diff --git a/src/layout/text.rs b/src/layout/text.rs index af74df13..996c5139 100644 --- a/src/layout/text.rs +++ b/src/layout/text.rs @@ -61,7 +61,7 @@ impl<'a, 'p> TextLayouter<'a, 'p> { self.buffer = String::new(); } - self.actions.add(LayoutAction::SetFont(index, self.ctx.style.font_size)); + self.actions.add(LayoutAction::SetFont(index, self.ctx.style.font_size())); self.active_font = index; } @@ -73,7 +73,7 @@ impl<'a, 'p> TextLayouter<'a, 'p> { } Ok(Layout { - dimensions: Size2D::new(self.width, self.ctx.style.font_size), + dimensions: Size2D::new(self.width, self.ctx.style.font_size()), alignment: self.ctx.alignment, actions: self.actions.to_vec(), }) @@ -108,7 +108,7 @@ impl<'a, 'p> TextLayouter<'a, 'p> { .advance_width as f32; let char_width = font_unit_to_size(glyph_width) - * self.ctx.style.font_size.to_pt(); + * self.ctx.style.font_size().to_pt(); return Ok((index, char_width)); } -- cgit v1.2.3