From 137d2ab317955d9b0229a9f807a3a9620b9d9f59 Mon Sep 17 00:00:00 2001 From: Laurenz Date: Wed, 1 Feb 2023 13:32:39 +0100 Subject: [PATCH] Always apply math italics corrections --- Cargo.lock | 1 + library/Cargo.toml | 1 + library/src/math/row.rs | 6 +----- 3 files changed, 3 insertions(+), 5 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 4674b425d..68f9a4100 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1142,6 +1142,7 @@ dependencies = [ "hypher", "kurbo", "lipsum", + "log", "once_cell", "roxmltree", "rustybuzz", diff --git a/library/Cargo.toml b/library/Cargo.toml index d0debe61b..148341e0d 100644 --- a/library/Cargo.toml +++ b/library/Cargo.toml @@ -16,6 +16,7 @@ csv = "1" hypher = "0.1" kurbo = "0.8" lipsum = { git = "https://github.com/reknih/lipsum" } +log = "0.4" once_cell = "1" roxmltree = "0.14" rustybuzz = "0.5" diff --git a/library/src/math/row.rs b/library/src/math/row.rs index ec2ba504c..5862bfc60 100644 --- a/library/src/math/row.rs +++ b/library/src/math/row.rs @@ -60,11 +60,7 @@ impl MathRow { let mut amount = Abs::zero(); if let MathFragment::Glyph(glyph) = *prev { - if !glyph.italics_correction.is_zero() - && fragment.class() != Some(MathClass::Alphabetic) - { - amount += glyph.italics_correction; - } + amount += glyph.italics_correction; } amount += spacing(prev, &fragment, style, space, space_width).at(font_size);