diff options
| author | Laurenz <laurmaedje@gmail.com> | 2023-02-12 16:56:51 +0100 |
|---|---|---|
| committer | Laurenz <laurmaedje@gmail.com> | 2023-02-12 17:28:17 +0100 |
| commit | f4856c18b9cf3f6952276cc61b557aebeb2fa651 (patch) | |
| tree | bf96d2e6d9c154c1e2603c096ff9d6f39db0e217 /library/src/math | |
| parent | 697ae1f925f1be80b34c1da697ba8db7327a6b61 (diff) | |
Remove base width
Diffstat (limited to 'library/src/math')
| -rw-r--r-- | library/src/math/ctx.rs | 7 |
1 files changed, 2 insertions, 5 deletions
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, |
