File tree Expand file tree Collapse file tree 3 files changed +12
-1
lines changed
crates/typst-layout/src/math Expand file tree Collapse file tree 3 files changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -739,7 +739,9 @@ fn assemble(
739739 }
740740
741741 advance -= max_overlap;
742- growable += max_overlap - min_overlap;
742+ // In case we have that max_overlap < min_overlap, ensure we
743+ // don't decrease the value of growable.
744+ growable += ( max_overlap - min_overlap) . max ( Abs :: zero ( ) ) ;
743745 }
744746
745747 full += advance;
Original file line number Diff line number Diff line change @@ -91,3 +91,12 @@ $ body^"text" $
9191 }
9292 $ body ^" long text" $
9393}
94+
95+ --- math-stretch-min-overlap-exceeds-max ---
96+ // Test that glyph assembly doesn't end up with negative lengths if the max
97+ // overlap calculated is less than the minConnectorOverlap.
98+ # show math . equation : set text (font : " STIX Two Math" )
99+ // Warning: glyph has assembly parts with overlap less than minConnectorOverlap
100+ // Hint: its rendering may appear broken - this is probably a font bug
101+ // Hint: please file an issue at https://github.com/typst/typst/issues
102+ $ stretch (->)^" Gauss-Jordan Elimination" $
You can’t perform that action at this time.
0 commit comments