Always apply math italics corrections

This commit is contained in:
Laurenz 2023-02-01 13:32:39 +01:00
parent 2315b5d3cc
commit 137d2ab317
3 changed files with 3 additions and 5 deletions

1
Cargo.lock generated
View File

@ -1142,6 +1142,7 @@ dependencies = [
"hypher",
"kurbo",
"lipsum",
"log",
"once_cell",
"roxmltree",
"rustybuzz",

View File

@ -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"

View File

@ -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);