mirror of
https://github.com/typst/typst
synced 2025-05-13 20:46:23 +08:00
Always apply math italics corrections
This commit is contained in:
parent
2315b5d3cc
commit
137d2ab317
1
Cargo.lock
generated
1
Cargo.lock
generated
@ -1142,6 +1142,7 @@ dependencies = [
|
|||||||
"hypher",
|
"hypher",
|
||||||
"kurbo",
|
"kurbo",
|
||||||
"lipsum",
|
"lipsum",
|
||||||
|
"log",
|
||||||
"once_cell",
|
"once_cell",
|
||||||
"roxmltree",
|
"roxmltree",
|
||||||
"rustybuzz",
|
"rustybuzz",
|
||||||
|
@ -16,6 +16,7 @@ csv = "1"
|
|||||||
hypher = "0.1"
|
hypher = "0.1"
|
||||||
kurbo = "0.8"
|
kurbo = "0.8"
|
||||||
lipsum = { git = "https://github.com/reknih/lipsum" }
|
lipsum = { git = "https://github.com/reknih/lipsum" }
|
||||||
|
log = "0.4"
|
||||||
once_cell = "1"
|
once_cell = "1"
|
||||||
roxmltree = "0.14"
|
roxmltree = "0.14"
|
||||||
rustybuzz = "0.5"
|
rustybuzz = "0.5"
|
||||||
|
@ -60,12 +60,8 @@ impl MathRow {
|
|||||||
|
|
||||||
let mut amount = Abs::zero();
|
let mut amount = Abs::zero();
|
||||||
if let MathFragment::Glyph(glyph) = *prev {
|
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);
|
amount += spacing(prev, &fragment, style, space, space_width).at(font_size);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user