summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--graphics/src/text/paragraph.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/graphics/src/text/paragraph.rs b/graphics/src/text/paragraph.rs
index 56cd8868..5d027542 100644
--- a/graphics/src/text/paragraph.rs
+++ b/graphics/src/text/paragraph.rs
@@ -219,7 +219,7 @@ impl core::text::Paragraph for Paragraph {
glyph.w
* (1.0
- graphemes_seen.saturating_sub(index) as f32
- / last_grapheme_count as f32)
+ / last_grapheme_count.max(1) as f32)
};
Some(Point::new(