diff options
| author | Laurenz <laurmaedje@gmail.com> | 2023-10-03 16:20:24 +0200 |
|---|---|---|
| committer | Laurenz <laurmaedje@gmail.com> | 2023-10-03 16:22:10 +0200 |
| commit | 6b1233e127d815b38fea9ab909dd4081cdf76ca2 (patch) | |
| tree | 50bae7ed62697b9e824ae0694ad2f7159e76f25f /crates/typst-library/src | |
| parent | d709b0e2479d780625becc2f493ce4067aa20cb3 (diff) | |
Fix test failure
Before we tested with an unavailable font, but the hyphens were still visible. But now the hyphens respect fallback too, so it's really hard to test it. I am removing the test for now.
Diffstat (limited to 'crates/typst-library/src')
| -rw-r--r-- | crates/typst-library/src/text/shaping.rs | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/crates/typst-library/src/text/shaping.rs b/crates/typst-library/src/text/shaping.rs index 73ae0779..4fe6b49b 100644 --- a/crates/typst-library/src/text/shaping.rs +++ b/crates/typst-library/src/text/shaping.rs @@ -451,11 +451,10 @@ impl<'a> ShapedText<'a> { .glyphs .last() .map(|g| g.range.end..g.range.end) - // In the unlikely chance that we hyphenate after an - // empty line, ensure that the glyph range still falls - // after self.base so that subtracting either of the - // endpoints by self.base doesn’t underflow. - // See <https://github.com/typst/typst/issues/2283>. + // In the unlikely chance that we hyphenate after an empty line, + // ensure that the glyph range still falls after self.base so + // that subtracting either of the endpoints by self.base doesn't + // underflow. See <https://github.com/typst/typst/issues/2283>. .unwrap_or_else(|| self.base..self.base); self.width += x_advance.at(self.size); self.glyphs.to_mut().push(ShapedGlyph { |
