summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFederico Mena Quintero <federico@gnome.org>2023-02-14 19:19:33 -0600
committerFederico Mena Quintero <federico@gnome.org>2023-02-14 19:19:33 -0600
commitec25e6bc37bfd0b4ed1976f7c9ebab6b17330470 (patch)
tree4705645ccdfe7b68693adedcdde9bc0705cc6d8d
parentfd9f7dbb495b282b1a295cc57c9a66cb2f1a703d (diff)
downloadlibrsvg-ec25e6bc37bfd0b4ed1976f7c9ebab6b17330470.tar.gz
Remove assertion that I used to check my understanding of Pango's sizes
Yes, the sizes returned from pango_layout_get_size() are positive if Pango doesn't overflow its i32 values. The assertions were there from e4dc9bacdb528ce03109d8f98d1d7a7c88d6416e when I was checking what Pango does for RTL text. Part-of: <https://gitlab.gnome.org/GNOME/librsvg/-/merge_requests/796>
-rw-r--r--src/text.rs4
1 files changed, 0 insertions, 4 deletions
diff --git a/src/text.rs b/src/text.rs
index e64fdf04..e209d8b2 100644
--- a/src/text.rs
+++ b/src/text.rs
@@ -377,10 +377,6 @@ impl MeasuredSpan {
let w = f64::from(w) / f64::from(pango::SCALE);
let h = f64::from(h) / f64::from(pango::SCALE);
- // This is the logical size of the layout, regardless of text direction, so it's always positive.
- assert!(w >= 0.0);
- assert!(h >= 0.0);
-
let advance = if layout_context.writing_mode.is_horizontal() {
(w, 0.0)
} else {