From f4856c18b9cf3f6952276cc61b557aebeb2fa651 Mon Sep 17 00:00:00 2001 From: Laurenz Date: Sun, 12 Feb 2023 16:56:51 +0100 Subject: Remove base width --- library/src/math/ctx.rs | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'library/src/math') diff --git a/library/src/math/ctx.rs b/library/src/math/ctx.rs index d43d1b2a..a3aa4047 100644 --- a/library/src/math/ctx.rs +++ b/library/src/math/ctx.rs @@ -25,7 +25,7 @@ macro_rules! percent { /// The context for math layout. pub struct MathContext<'a, 'b, 'v> { pub vt: &'v mut Vt<'b>, - pub regions: Regions<'a>, + pub regions: Regions<'static>, pub font: &'a Font, pub ttf: &'a ttf_parser::Face<'a>, pub table: ttf_parser::math::Table<'a>, @@ -60,10 +60,7 @@ impl<'a, 'b, 'v> MathContext<'a, 'b, 'v> { let variant = variant(styles); Self { vt, - regions: { - let size = Size::new(regions.first.x, regions.base.y); - Regions::one(size, regions.base, Axes::splat(false)) - }, + regions: Regions::one(regions.base(), Axes::splat(false)), font: &font, ttf: font.ttf(), table, -- cgit v1.2.3