diff options
| author | Laurenz <laurmaedje@gmail.com> | 2019-12-13 23:59:01 +0100 |
|---|---|---|
| committer | Laurenz <laurmaedje@gmail.com> | 2019-12-13 23:59:01 +0100 |
| commit | 665b4d2aca81af48b8e0eaca4e709ef2e7825844 (patch) | |
| tree | 4ada33f607455f14b6a170fe4b7fbe173056567b /src/layout/text.rs | |
| parent | 971ff3a2dcff1e68bf7e19017113469aad5a30c2 (diff) | |
More consistent library code and functions 🎄
Diffstat (limited to 'src/layout/text.rs')
| -rw-r--r-- | src/layout/text.rs | 6 |
1 files changed, 3 insertions, 3 deletions
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)); } |
